Why doesn't setuptools 1.3.1 appear when I pip freeze?
Asked Answered
M

2

27

I am running virtualenvwrapper and friends on Ubuntu 12.04 (virtualenvwrapper 1.7.1.2, virtualenv 1.7.1.2, pip 1.0, Distribute 0.6.24, Python 2.7). To be able to pip install matplotlib I need a newer version of Distribute/setuptools, so I do the following:

$ mkvirtualenv new_venv
$ pip install matplotlib # fails
$ easy_install -U distribute
# installs Distribute 0.7.3 in the venv,
# which then installs setuptools 1.3.1
$ pip install matplotlib # works

However, when I run pip freeze I get:

argparse==1.2.1
distribute==0.7.3 # here's Distribute
matplotlib==1.3.1
nose==1.3.0
numpy==1.8.0
pyparsing==2.0.1
python-dateutil==2.2
six==1.4.1
tornado==3.1.1
wsgiref==0.1.2

Where is setuptools? I've tried just pip install setuptools and it also fails to show up there.

Musclebound answered 7/11, 2013 at 13:37 Comment(0)
L
29

pip won't list packages that pip itself depends on unless you tell it to. You may include such packages by doing: pip freeze --all

freeze lists packages in a requirements-format - for use in requirements files etc - while list is just that, a list.

See Pip freeze vs. pip list for more details.

Lowman answered 21/6, 2018 at 10:36 Comment(1)
pip freeze --all did now work with pip version 7.0.1 on python 2.7. I used pip list though and it workedMcgovern
G
10

On Ubuntu setuptools is installed by the systems package manager. So it is not listed when you pip freeze. While creating a virtualenv, you will get these messages

mkvirtualenv test
New python executable in test/bin/python
Installing setuptools, pip...done.

If you do a pip freeze immediately after this, you will get something like this

argparse==1.2.1
wsgiref==0.1.2

Here setuptools and pip wont be listed.

If you want everything you can do a pip list which gives something like this.

argparse (1.2.1)
pip (1.5.6)
setuptools (3.6)
wsgiref (0.1.2)
Grateful answered 18/10, 2014 at 16:5 Comment(1)
What is the difference between freeze and list?Hypercatalectic

© 2022 - 2024 — McMap. All rights reserved.