Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm conda env not showing packages installed via pip

Running Pycharm, using Anaconda, with a conda env running Python 2.7 on OS X.

In terminal, running conda list shows package list as being installed... but it doesn't show up in the list of packages under 'Preferences > Project Interpreter', and PyCharm isn't able to autocomplete anything involving packages.

But when I run the same script from the command line, it works just fine.

Any ideas on why the same conda env in PyCharm can't see the packages installed by pip?

In terminal pip list:

in terminal pip list

In pycharm package list:

in pycharm package list

like image 726
Doogie.Min Avatar asked Sep 17 '16 01:09

Doogie.Min


People also ask

Can I use pip install in conda environment?

You can install pip in the current conda environment with the command conda install pip , as discussed in Using pip in an environment. If there are instances of pip installed both inside and outside the current conda environment, the instance of pip installed inside the current conda environment is used.

Does conda see pip packages?

Once pip is used to install software into a conda environment, conda will be unaware of these changes and may make modifications that would break the environment.

Why pip is not working in PyCharm?

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.


1 Answers

In PyCharm 2017.1:

  • Click on the button next to the Project Interpreter name (a gear icon) and choose Add Local
  • Choose the path to your conda env (probably ~/anaconda/envs/your-env-name/bin/python)

You should see the table with a list of packages in the Preferences window below the Project Interpreter name.

like image 62
Guilherme Beltramini Avatar answered Sep 23 '22 15:09

Guilherme Beltramini