PyCharm CE: 'Successfully' installed packages not installing

Completed

PyCharm CE 2018.3, Mac OS 10.14.1

Steps:

Preferences > Project: Name > Project Interpreter

Click + and install package

"Package 'foo' installed successfully", in interface and Event Log

 

Expect

See package 'foo' or at least an error. 

 

Actual.

No change to the package list, and package is not installed.

 

 

5 comments

Please try File | Invalidate Caches/Restart... . If doesn't help, run pip list for this interpreter to see if they are actually installed.

0

Hi Sergey,

Still the same problem. 

 

$ pip list
Package Version
---------- -------
pip 18.1
setuptools 40.6.2
You are using pip version 18.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

$ pip install numpy

Installing collected packages: numpy

Successfully installed numpy-1.16.1

Target directory /usr/local/lib/python2.7/site-packages/numpy-1.16.1.dist-info already exists.

 

which is still the wrong location.

 

$ which pip

pip is /Users/gary/PycharmProjects/Test/venv/bin/pip

 

 

0

Please try it outside of PyCharm (e.g. from system terminal). Install some package with pip install and then run pip list. Can you see installed package?

0

If I do

`$ cd

pip3 install colorama

pip3 list

Package    Version

---------- -------

pip        18.1   

setuptools 40.6.2

You are using pip version 18.1, however version 19.0.2 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.`

Then colorama does not appear. However, it is installed inside the Python2.7 folder. (Not the 3.7). 

 

$ cd /usr/local/lib/python2.7/site-packages

drwxr-xr-x   5 gary  staff   160B Feb 12 00:36 bin/

drwxr-xr-x   9 gary  staff   288B Feb 12 01:44 colorama/

drwxr-xr-x   8 gary  staff   256B Feb 12 01:44 colorama-0.4.1.dist-info/

drwxr-xr-x  30 gary  staff   960B Feb 12 00:36 numpy/

drwxr-xr-x   9 gary  staff   288B Feb 12 00:36 numpy-1.16.1.dist-info/

 

Something is causing, all packages to be installed into `/usr/local/lib/python2.7/site-packages` but I would have thought that PyCharm would not be affected by any settings outside the virtual environment.

0

There was an invisible

~/.config/pip/pip.conf 

file. That contained these lines:

[global]
target = /usr/local/lib/python2.7/site-packages

This file was a few years old, so I'm unsure how it got there but removing it resolved the issue.

0

Please sign in to leave a comment.