When i use eclipse PyDev to open an exist python project, sometimes i meet invalid external source folder specified error like below. This article will tell you how to fix it.
1. Why External Source Folder Is Invalid.
The reason is because the external libraries source folder specified in this project has been changed to another folder, for example i clone the project source code from a git repository, and i use MacOS when i submit the code, but now i clone it to a local Linux OS, so the external libraries source folder is not same because different OS use different path naming rules.
2. How To Fix Invalid External Source Folder.
- First you should make sure the external library has been installed in your local machine OS.
- If not installed, you need to install it first.
- Then right click the python project, then click Properties —> PyDev – PYTHONPATH —> External Libraries to open the PYTHONPATH editor window.
- Click Remove button to remove current incorrect external source folder path.
- Click Add source folder button to browse and select the correct external library source folder.
- Because i do not install anaconda3 in my Linux OS, so i need to go to anaconda website to download the installation file, then install it. After that add the correct folder in PYTHONPATH external libraries, then click Apply and Close button to save the changes. Now refresh the project, the invalid external source folder error will disappear.