pip user install doesn't know of previously installed package

Bug #1628432 reported by Pierre Haessig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)
New
Undecided
Unassigned

Bug Description

On a pretty fresh Ubuntu 16.04, I'm installing some Python packages with pip (as a user). (pip version is 8.1.1). My example package is ipython. The command:

$ pip install ipython

generates a bunch of downloads, including some packages that I previously installed with aptitude (ex : python-pygments). But it's not just about .deb Python package, it's also about the pip installed packages. Indeed, if I run again:

$ pip install ipython

then the installation is performed again (only difference: the cache of wheel files is being used). Obviously pip doesn't recognize the packages already installed (or maybe the end of the installation process failed ?). On the other hand, there is no visible problem with ipython installation: it seems to run fine.

I don't remember having done many tweaks to my Ubuntu (it's a quite fresh VM) that could explain this broken behavior in the detection of dependencies. I've only added .local/bin to my PATH so that the ipython command runs properly (I indeed got bitten by the issued predicted by Donald Stufft in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725848). Also, among the "exotic" Python packages, I have python-omniorb.

here are my PATH and Python module path variables:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/modelica/.local/bin

$ python -c "import sys; print sys.path"
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/home/modelica/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/omniORB/COS', '/usr/lib/python2.7/dist-packages/gtk-2.0']

(notice: I've reported similar behavior as a question at http://askubuntu.com/questions/828642/pip-doesnt-know-of-apt-get-installed-packages but didn't get that much feedback, except that pip should be upgraded to 8.1.2, but I don't feel comfortable upgrading pip with a broken pip...)

Revision history for this message
Pierre Haessig (pierreh) wrote :

I can confirm the bug on a fresh install of Ubuntu 16.04.1. Pip user install is severely broken!

Steps to reproduce:

1. install Ubuntu 16.04.1 (I'm in a VM)
2. sudo apt-get install python-pip
3. try some pip install. Even a simple package as termcolor

$ pip install termcolor
... installs
$ pip install termcolor
... installs again!

however pip uninstall works ok!

Also, sudo installation is fine: it recognizes the user installed package ! (see attached session log)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.