On a quite fresh Ubuntu 16.04, I'm installing ipython with pip, as a user installation. Pip itself was installed from the
python-pip Ubuntu package (8.1.1), and so are some dependencies like pygments or setuptools (20.7.0).
My question: is it normal that when doing a user installation with pip, apt-get installed packages are not detected? Is is a known bug?
This is the command I run (as a user, not as root):
$ pip install ipython
→ I get the download of many packages from PyPI, including setuptool (27.3.0) and Pygments (2.1.3). I don't think it's a version issue, since ipython requires
setuptools>=18.5 only. Incidentally, I also get a complaint that pip should be updated to latest version (8.1.2).
Even more intriguing, when I run the same command again, I get the same installation process (only difference: wheels are cached). Instead, I would expect pip telling me that ipython is already installed.
Notice that there is no doubt that ipython (version 5.1.0) is indeed installed in my
~/.local directory, and it runs well (the only adjustment I had to make was adding
~/.local/bin to the
PATH variable in
~/.bashrc as mentioned in a dedicated question).
It seems to me that something is wrong with the way pip detects apt-get installed packages, but I cannot figure out what. Am I missing something obvious?
If it can help the diagnostic, this is the Python module path (modelica is the username):
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']
python-pippackage is indeed slightly outdated. You can ignore it if the pip you have still works. However, if you do plan to upgrade it, I would suggest using a virtualenv to do it. As for running
pip install ipythona second time, I am surprised pip doesn't just tell you ipython is already installed; it definitely does say that for me in a virtualenv. Can you try again to make sure this particular behavior is reproducible?