Reputation: 1219
I started a project without PyCharm and I setup a VirtualEnv which I have installed Django, Pillow etc.
I have imported the project to PyCharm and even if I configured the Project Interpreter to the location of the VirtualEnv, PyCharm seems that don't recognise the installed modules in this virtual environment.
The project interpreter location looks like this:
path/to/project/virtualenv_folder/bin/python3.5
Now PyCharm Project Interpreter has only the basic packages shown in the table like pip, setuptools, wheel but not the ones I have in virtualenv which are Django, Pillow.
I am sure that the packages are installed in that virtualenv because I did:
source path/to/project/virtualenv_folder/bin/activate
pip freeze
And the packages are there. I search all the documentations of JetBrain and I couldn't find anything.
PyCharm Version: Professional 2016.1
Upvotes: 3
Views: 4034
Reputation: 121
How did you add the virtual environment to PyCharm? The correct way is:
HTH
OK. I read your answer and obviously the work around did it for you. Still strange. Are you on 2016.1.4?
Upvotes: 7
Reputation: 1219
I manage to solve my problem by creating the virtualenv within PyCharm to the project directory.
Now installing packages from terminal or/and within PyCharm will work for both terminal and PyCharm.
Upvotes: 1