pythonmacosvagrantpycharm

Why is PyCharm giving the error "No such file or directory" when opening a Python project?


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://vagrant@127.0.0.1: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.


Solution

  • 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.