0

I've been looking at similar questions for about an hour now, but so far no suggestions I've seen have helped me troubleshoot this issue. For example: 'virtualenv' 'pip install sqlalchemy' but 'pip list' can not see did not help.

Setup:

  1. In my project directory, I typed simply virtualenv env
  2. Then source env/bin/activate
  3. I confirmed pip and python are being run from my venv with which pip etc.
  4. pip install matplotlib, and it looks successful:

...

Installing collected packages: subprocess32, kiwisolver, numpy, matplotlib

Successfully installed kiwisolver-1.0.1 matplotlib-2.2.2 numpy-1.14.2 subprocess32-3.2.7

  1. python and then >> import matplotlib produces:

ImportError: No module named matplotlib

I've looked in env/lib/python2.7/site-packages and sure enough, no matplotlib.

Matt Takao
  • 2,406
  • 3
  • 16
  • 30
  • check with `pip freeze` whether the libraries are installed or not – Mulagala Apr 11 '18 at 06:43
  • what version of pip are you on? See if its related to [the recent TLS deprecation for pip](https://stackoverflow.com/a/49748494/1526703) – Anupam Apr 11 '18 at 06:52

1 Answers1

0

BTW, found the answer: on my amazon EC2 linux, pip was installing to the lib64 directory, not lib. So I just made lib/.../site-packages the --target of pip install and it finally put it there.

Matt Takao
  • 2,406
  • 3
  • 16
  • 30
  • there is a (currently still open) issue for this at https://github.com/pypa/pip/issues/4464 – avigil Apr 12 '18 at 05:11