question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packages installed by pip in lib64 are not recognized by pip

See original GitHub issue
  • Pip version: 9.0.1
  • Python version: 3.5
  • Operating system: Amazon Linux AMI release 2017.03

Description:

I am working in a virtual environment created with virtualenv. There are a few packages that I am trying to install, however two of them, psycopg2 and pillow, are not working correctly.

When I run pip install <package>, it works as expected. However, neither of the two modules are shown using pip show <package> or pip list. pip install <package> can be run again with the same result.

It turns out that the two packages were being installed in env/lib64/python3.5/dist-packages. All the other packages were being installed in env/lib/python3.5/dist-packages

For some reason, pip is not seeing the packages it has installed in the lib64 folder. Packages installed in the lib folder are recognized correctly.

What I’ve run:

(env)[ec2-user@ws4 test]$ pip install psycopg2
Collecting psycopg2
  Using cached psycopg2-2.7.1-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: psycopg2
Successfully installed psycopg2-2.7.1
(env)[ec2-user@ws4 test]$ pip show psycopg2
(env)[ec2-user@ws4 test]$
(env)[ec2-user@ws4 test]$ pip install pillow
Collecting pillow
  Using cached Pillow-4.1.1-cp35-cp35m-manylinux1_x86_64.whl
Requirement already satisfied: olefile in /var/www/domains/ndp/associations/env/lib/python3.5/dist-packages (from pillow)
Installing collected packages: pillow
Successfully installed pillow-4.1.1
(env)[ec2-user@ws4 test]$ pip show pillow
(env)[ec2-user@ws4 test]$

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:18
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

22reactions
morronecommented, Nov 8, 2017

Same problem here with pip 9.0.1 and python 3.6. My information for what @xavfernandez asked for is substantially similar to what @jpotterm supplied. I too was able to work around the problem by using “pip install --upgrade --target /path/to/my/sandbox/lib/python3.6/dist-packages”. That seems to force everything into lib that was once isntalled in lib64. Now pip and python can find those packages.

14reactions
nchammascommented, Jun 19, 2017

I am seeing this exact issue as well on Amazon Linux. pip is installing everything to lib/ except for a couple of libraries, which it installs to lib64/. In my case, those libraries are jellyfish and regex. My current workaround is to use pip --target to force pip to install to lib/ rather than lib64/.

So my questions are:

  • Why does pip install some libraries to lib/ vs. lib64/?
  • Why isn’t pip seeing the stuff it’s installing itself to lib64/?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip Install not installing into correct directory? - Stack Overflow
The actual best way to use it is to install a local, non-root, python version. You just have to make sure that you...
Read more >
Pip install not to site-packages directory - Python Help
I have installed Python 3.7.5 on MacOS 10.14.6 from brew (brew install python). brew info python shows: You can install Python packages with ......
Read more >
Every package installed with pip is not found - Ask Ubuntu
When you logged in, before you installed your first pip packages, this directory did not exist so it is not currently in your...
Read more >
How does python find packages?
I just ran into a situation where I compiled and installed Python 2.7.9 from source on Ubuntu, but Python could not find the...
Read more >
Python Packages and Virtual Environments - Baylor University
Before trying to install a python package (or requesting that one be installed) make sure that you have loaded a python module and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found