Using IntellijIdea Within An Exisiting Virtualenv

To add a virtual environment to Intellij Idea, You have added virtualenv folder's python to project SDK. Which means that virtualenv directory's python( for example venv/bin/python2.7) needs to be added to Intellij Idea project path. Here is a demonstration:

For Older versions:

The virtualenv directory's python( for example venv/bin/python2.7) needs to be added to IntelliJ Idea project path. Example: need to go to file>project structure (IntelliJ Idea)

press (new) in Project SDK, and add new path to virtualenv's python directory like this:

Go to Modules>Dependencies and set your module SDK to Python SDK which is marked on this picture:

Click on Django (option marked in next the image) and set Django project root, Settings, Manage Script like this:

Now press ok and final look of the Project settings:

Now need to run the project.

For Pycharm 2016 and later

To add an existing virtual environment to the list of available interpreters

In the Project Interpreter page,


In the drop-down list, choose to Add local.
add environment option

In the Select Python Interpreter dialog box that opens, choose the desired Python executable, located inside the virtual environment folder, and click OK.
Go to this link for more information.
Now need to run the project.

My Stackoverflow Answer is here: http://stackoverflow.com/questions/20877106/using-intellijidea-within-an-existing-virtualenv/20879661#20879661

comments powered by Disqus