Django Not Found on OS X

I have a brand new Macbook Pro running OS X 10.9.3.  I installed PyCharm fine.  I then opened up the Terminal and ran downloaded pip, ran "pip get Django," verified that Django was installed and that I can do an "import django" and all was well.

However, PyCharm will not let me create a Django project and says that it cannot find the interpreter.  I can run the 2.7 interpreter manually and import django... no problem, I've also pointed it at /usr/bin/python and it loaded a bunch of stuff and then bombed out saying.. no django.

I don't get it.  I cannot find any clear instructions on the website on how to configure PyCharm for Django development on OS X.

Any help would be appreciated.  I have PyCharm running on Linux and Windows w/Django without any issues.

Same problem here. Please answer the question!
Hello Aljoscha,

My brand new Macbook Pro had issues.  So, I've just decided to revert back to a Linux environment and use PyCharm on that.  However, I was able to work around this prior to the laptop going awry.

OS X comes pre-installed with three different Python interpreters but I believe uses those internally.  So, after doing some research I just figured it'd be significantly easier, and cleaner to run any Python development on OS X through virtualenv.  To do so with PyCharm, I did the following:

  • Open PyCharm and select "Create New Project"
  • Click the gear icon to the right of "Interpreter"
  • Select "Create virtualenv"

Follow the prompts from there.  The nice piece about this approach is that you'll have a virtualenv folder in your home directory that is self encompassing and will not interfere with the system installations of Python.  You can google about to get more info on virtualenv but it is remarkably easy to use and this approach works fine on OS X.  Also clean... want to start over, delete your directory (wherever you decide to put it (i.e. in ~/venv or something).

I hope that helps.  If not, let me know and I'll do what I can to answer any questions.


Please sign in to leave a comment.