98

I've installed a Python package using pip, which is a replacement for easy_install. How do I get a list of which installed files are associated with this package?

Basically, I'm looking for the Python package equivalent of

dpkg -L

or

rpm -ql

3 Answers3

132

You could do that by using command:

pip show -f <package>
Bunyk
  • 1,502
6

Two years later, most pip instances have show, however, not all packages have the installed-files.txt program for the subcommand to read.

A workaround is to fire up the python shell and do this:

>>> import eventlet
>>> eventlet.__path__
    ['/usr/lib/python2.7/dist-packages/eventlet']

where "eventlet" is the package I installed with pip.

coyot
  • 161
4

I use virtualenv with pip, so here are the steps I follow. Assume I'm working in the dave_venv virtual environment.

$ cat ~/.bashrc

export WORKON_HOME=/usr/local/virtualenvs

$ cd /usr/local/virtualenvs/dave_venv/lib/python2.6/site-packages
$ ls # This should show <your_package>.
$ cd <your_package>
$ ls # now you're looking at your package's files.