Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm Python project No such file or directory

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.

like image 414
George Taskos Avatar asked May 01 '14 13:05

George Taskos


4 Answers

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.

like image 142
mustgndgd Avatar answered Oct 16 '22 17:10

mustgndgd


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.

like image 28
silentser Avatar answered Oct 16 '22 19:10

silentser


Another way to add the project context root in the preferences.

Preferences -> Project Structure -> Add Context Root

enter image description here

like image 21
Gajen Sunthara Avatar answered Oct 16 '22 18:10

Gajen Sunthara


I solved the problem by simply removing .idea folder. You can try also this way.

like image 33
ah bon Avatar answered Oct 16 '22 18:10

ah bon