Linux Command Library
commands
Commands
basic
Basic
tips
Tips

pip

install Python packages

- Install a package:
pip install [package_name]

- Install a specific version of a package:
pip install [package_name]==[package_version]

- Upgrade a package:
pip install -U [package_name]

- Uninstall a package:
pip uninstall [package_name]

- Save installed packages to file:
pip freeze > [requirements.txt]

- Install packages from file:
pip install -r [requirements.txt]

pip [command] [options]

pip is an alternative Python package installer. It performs the same basic job as easy_install, but with some extra features. It can work with version control repositories (currently only Git, Mercurial, and Bazaar repositories), logs output extensively, and prevents partial installs by downloading all requirements before starting installation.

It has some disadvantages when compared to easy_install. It does not use egg files, although it does preserve egg metadata. Some setuptools features are not yet supported, and some custom setup.py features won´t work.

pip is designed to work with virtualenv, in that it can be given the path to a virtualenv environment (with -E or --environment) and it will know to install to that environment instead of the system locations.

The command comes before any options. The following commands are recognized:

help

Show the help text.

bundle

Create "bundles" which can be used by pip to install the group of Python packages in multiple places.

freeze

Write the current list of installed packages to a requirements file, which can be used by pip to reinstall the same set of packages.

install

Install packages.

search

Search PyPI.

uninstall

Uninstall an individual package.

unzip

Unzip an individual package.

zip

Zip an individual package.

-h, --help

Show summary of options.

--version

Show the version of the program.

-v, --verbose

Be more verbose.

-q, --quiet

Be less verbose; suppress unimportant output.

-E, --environment=DIR

When using pip with a virtual environment created by virtualenv, use this option to specify either the path to the environment or the path to its Python interpreter.

--log=FILENAME

Log file where a complete (maximum verbosity) record will be kept.

--proxy=PROXY

Have pip use a proxy server to access sites. This can be specified using "user:password@proxy.server:port" notation. If the password is left out, pip will ask for it.

-s, --enable-site-packages

Include site-packages in virtualenv if one is to be created. Ignored if --environment is not used or the virtualenv already exists.

--timeout=TIMEOUT

Set the timeout for connecting to download sites, in seconds. This defaults to 15 seconds if not given.

 This manual page was originally written by Jeff Licquia <licquia@debian.org>, later rewritten by Carl Chenet <chaica@ohmytux.com>. 

 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, version 3 or any later version published by the Free Software Foundation.

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied