Why don't 'pip show' or 'pip list' work for me?

前端 未结 4 542
谎友^
谎友^ 2021-02-06 05:50

Python\'s pip is working for me to install and update packages, but some of the documented commands seem not to be supported (at least with 1.2.1 running on OS 10.8

相关标签:
4条回答
  • 2021-02-06 06:25

    Where are they documented? Mine doesn't show any such commands:

    hd1 % pip help
    Usage: pip COMMAND [OPTIONS]
     --version                    show program's version number and exit
     -h, --help                   Show help
     -v, --verbose                Give more output
     -q, --quiet                  Give less output
     --log <FILENAME>             Log file where a complete (maximum verbosity) record will be kept
     --proxy <PROXY>              Specify a proxy in the form user:passwd@proxy.server:port. Note that the user:password@ is optional and required only if you are behind an authenticated proxy. If you provide
                                  user@proxy.server:port then you will be prompted for a password.
     --timeout <SECONDS>          Set the socket timeout (default 15 seconds)
     --exists-action <EXISTS_ACTION>
                                  Default action when a path already exists. Use this option more than one time to specify another action if a certain option is not available. Choices: (s)witch, (i)gnore,
                                  (w)ipe, (b)ackup
    
    Commands available:
      bundle: Create pybundles (archives containing multiple packages)
      freeze: Output all currently installed packages (exact versions) to stdout
      help: Show available commands
      install: Install packages
      search: Search PyPI
      uninstall: Uninstall packages
      unzip: Unzip individual packages
      zip: Zip individual packages
    
    0 讨论(0)
  • 2021-02-06 06:28

    The new functions you're looking for are very recent -- they're in 1.2.1.post1, but not in 1.2.1, and the docs you're probably looking at (http://www.pip-installer.org/en/latest/) are currently for 1.2.1.post1.

    localhost-2:~ $ pip --version
    pip 1.2.1.post1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1.post1-py2.7.egg (python 2.7)
    localhost-2:~ $ pip --help
    Usage: pip COMMAND [OPTIONS]
    
    Commands:
      bundle               Create pybundles (archives containing multiple packages)
      freeze               Output all currently installed packages (exact versions) to stdout
      help                 Show available commands
      install              Install packages
      list                 List installed packages (including editables).
      search               Search PyPI
      show                 Output installed distributions (exact versions, files) to stdout
      uninstall            Uninstall packages
      unzip                Unzip individual packages
      zip                  Zip individual packages
    

    If you want them, you can get the development version:

    git clone https://github.com/pypa/pip.git
    
    0 讨论(0)
  • 2021-02-06 06:32

    The available commands are as of pip 1.1 are:

    • bundle: Create pybundles (archives containing multiple packages)
    • freeze: Output all currently installed packages (exact versions) to stdout
    • help: Show available commands
    • install: Install packages
    • search: Search PyPI
    • uninstall: Uninstall packages
    • unzip: Unzip individual packages
    • zip: Zip individual packages

    For a list of installed packages, try yolk.

    0 讨论(0)
  • 2021-02-06 06:32

    As a workaround you might be able to use pip freeze.

    From the help prompt:

    freeze: Output all currently installed packages (exact versions) to stdout
    
    0 讨论(0)
提交回复
热议问题