PyCharm Python project No such file or directory
Solution 1
Started having the same issue after upgrading to PyCharm 3.4 - before that everything was working fine and after the update the same error. Also fixed by updating the path mappings: go to Run/Debug Configurations and manually define the Path mappings - Local path should be the path of your Django project and remote path the path to the project in the vagrant VM.
Solution 2
I solved the problem by simply removing .idea
folder. You can try also this way.
Solution 3
I faced the same problem and I solved it as follows
Fİle > Settings > project ["your project name"] > Python Interpretor >
Add Interpretor > System Interpretor > Apply
I try it and its working but you can chose local interpretor it can be work.
Solution 4
Another way to add the project context root in the preferences.
Preferences -> Project Structure -> Add Context Root
Solution 5
I get this problem whenever I moved a project folder. I've found that the problem is the mapped folder in the virtual machine is no longer accessible; ls
shows something like below:
(vagrant) vagrant@ralph-dev:~/src$ ll
ls: cannot access ralph: No such file or directory
total 8
drwxr-xr-x 3 root root 4096 Jan 11 07:42 ./
drwxr-xr-x 15 vagrant vagrant 4096 Mar 7 09:45 ../
d????????? ? ? ? ? ? ralph/
The solution is do a vagrant reload
. After this the moved folder is mapped correctly.
George Taskos
Updated on July 05, 2022Comments
-
George Taskos almost 2 years
When trying to run a project in PyCharm I get the following error. I have setup the virtualbox, vagrant and all the requirements in the readme file they gave me but when pressing run...
ssh://[email protected]:2222/usr/bin/python -u /Users/gtas/Projects/PythonProj/manage.py runserver 0.0.0.0:8000 bash: line 0: cd: /Users/gtas/Projects/PythonProj: No such file or directory /usr/bin/python: can't open file '/Users/gtas/Projects/PythonProj/manage.py': [Errno 2] No such file or directory Process finished with exit code 2
EDIT:
It looks like the VM vagrant mappings are not properly configured/set.
I use a Mac OS X 10.9.2 and latest PyCharm IDE.