2

I recently upgraded all python data analysis tools using pip. When I do

dpkg -l |grep python

I see the old version numbers of the software I just upgraded via pip.

How can I ensure that the dpkg list reports the correct versions? (I assume dpkg -l needs to be correct)

For example, I upgraded ipython to version 1.0.0 using pip; however, dpkg reports version 0.13.2-1~ubuntu12.04.1

2 Answers2

5

It is not the same if you use dpkg instead of pip. The first is a package manager for Debian based systems and provides means to handle packages and install packages from the repositories made by package teams. PIP handles Python only packages and installs them from the cheese shop PyPI.

The two methods differ to the versions which they install with PIP always installing the newest package version.

One method to list all installed packages is to install and use yolk: sudo pip install yolk and then issue yolk -l to list all packages.

Other methods are mentioned at the following SE question:

Also these two questions talk about the difference of apt-get - pip for installing Python packages:

Stef K
  • 4,886
2

You're looking at two different package managers. DPKG/APT installs in /usr/lib/python2.7/dist-packages/ (note dist - it comes with the distribution) and pip/easy_install installs in other Python paths.

Both package managers are independent. Your Python application will use the version of the package first in the Python Path. Check your Python path with:

import sys
print sys.path
gertvdijk
  • 69,427