When I use eclipse PyDev to open an existing python project, sometimes I meet the error invalid external source folder specified. This article will tell you how to fix it.
1. Why External Source Folder Is Invalid.
- The reason is that 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 the same because different OS uses different paths 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 the Remove button to remove the 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 the 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.