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

前端 未结 2 1199
野的像风
野的像风 2021-02-12 22:40

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

相关标签:
2条回答
  • 2021-02-12 23:17

    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.

    0 讨论(0)
  • 2021-02-12 23:41

    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)
    
    0 讨论(0)
提交回复
热议问题