Commit 3dde375d authored by Kenneth Reitz's avatar Kenneth Reitz

pip v1.5.4

parent 483e30a5
...@@ -27,7 +27,7 @@ PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh" ...@@ -27,7 +27,7 @@ PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
DEFAULT_PYTHON_VERSION="python-2.7.6" DEFAULT_PYTHON_VERSION="python-2.7.6"
PYTHON_EXE="/app/.heroku/python/bin/python" PYTHON_EXE="/app/.heroku/python/bin/python"
PIP_VERSION="1.5.2" PIP_VERSION="1.5.4"
SETUPTOOLS_VERSION="2.1" SETUPTOOLS_VERSION="2.1"
# Setup bpwatch # Setup bpwatch
...@@ -220,7 +220,6 @@ puts-step "Installing dependencies using Pip ($PIP_VERSION)" ...@@ -220,7 +220,6 @@ puts-step "Installing dependencies using Pip ($PIP_VERSION)"
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install [ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first [ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src | cleanup | indent
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --allow-all-external | cleanup | indent /app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --allow-all-external | cleanup | indent
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install [ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
......
.. _`Configuration`:
Configuration
=================
.. _config-file:
Config file
------------
pip allows you to set all command line option defaults in a standard ini
style config file.
The names and locations of the configuration files vary slightly across
platforms.
* On Unix and Mac OS X the configuration file is: :file:`$HOME/.pip/pip.conf`
* On Windows, the configuration file is: :file:`%HOME%\\pip\\pip.ini`
You can set a custom path location for the config file using the environment variable ``PIP_CONFIG_FILE``.
The names of the settings are derived from the long command line option, e.g.
if you want to use a different package index (``--index-url``) and set the
HTTP timeout (``--default-timeout``) to 60 seconds your config file would
look like this:
.. code-block:: ini
[global]
timeout = 60
index-url = http://download.zope.org/ppix
Each subcommand can be configured optionally in its own section so that every
global setting with the same name will be overridden; e.g. decreasing the
``timeout`` to ``10`` seconds when running the `freeze`
(`Freezing Requirements <./#freezing-requirements>`_) command and using
``60`` seconds for all other commands is possible with:
.. code-block:: ini
[global]
timeout = 60
[freeze]
timeout = 10
Boolean options like ``--ignore-installed`` or ``--no-dependencies`` can be
set like this:
.. code-block:: ini
[install]
ignore-installed = true
no-dependencies = yes
Appending options like ``--find-links`` can be written on multiple lines:
.. code-block:: ini
[global]
find-links =
http://download.example.com
[install]
find-links =
http://mirror1.example.com
http://mirror2.example.com
Environment Variables
---------------------
pip's command line options can be set with
environment variables using the format ``PIP_<UPPER_LONG_NAME>`` . Dashes (``-``) have to replaced with underscores (``_``).
For example, to set the default timeout::
export PIP_DEFAULT_TIMEOUT=60
This is the same as passing the option to pip directly::
pip --default-timeout=60 [...]
To set options that can be set multiple times on the command line, just add spaces in between values. For example::
export PIP_FIND_LINKS="http://mirror1.example.com http://mirror2.example.com"
is the same as calling::
pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com
Config Precedence
-----------------
Command line options have precedence over environment variables, which have precedence over the config file.
Within the config file, command specific sections have precedence over the global section.
Examples:
- ``--host=foo`` overrides ``PIP_HOST=foo``
- ``PIP_HOST=foo`` overrides a config file with ``[global] host = foo``
- A command specific section in the config file ``[<command>] host = bar``
overrides the option with same name in the ``[global]`` config file section
Command Completion
------------------
pip comes with support for command line completion in bash and zsh.
To setup for bash::
$ pip completion --bash >> ~/.profile
To setup for zsh::
$ pip completion --zsh >> ~/.zprofile
Alternatively, you can use the result of the ``completion`` command
directly with the eval function of you shell, e.g. by adding the following to your startup file::
eval "`pip completion --bash`"
===========
Other tools
===========
virtualenv
----------
pip is most nutritious when used with `virtualenv
<http://pypi.python.org/pypi/virtualenv>`__. One of the reasons pip
doesn't install "multi-version" eggs is that virtualenv removes much of the need
for it. Because pip is installed by virtualenv, just use
``path/to/my/environment/bin/pip`` to install things into that
specific environment.
To tell pip to only run if there is a virtualenv currently activated,
and to bail if not, use::
export PIP_REQUIRE_VIRTUALENV=true
easy_install
------------
pip was originally written to improve on `easy_install <http://pythonhosted.org/setuptools/easy_install.html>`_ in the following ways:
* All packages are downloaded before installation. Partially-completed
installation doesn't occur as a result.
* Care is taken to present useful output on the console.
* The reasons for actions are kept track of. For instance, if a package is
being installed, pip keeps track of why that package was required.
* Error messages should be useful.
* The code is relatively concise and cohesive, making it easier to use
programmatically.
* Packages don't have to be installed as egg archives, they can be installed
flat (while keeping the egg metadata).
* Native support for other version control systems (Git, Mercurial and Bazaar)
* Uninstallation of packages.
* Simple to define fixed sets of requirements and reliably reproduce a
set of packages.
pip doesn't do everything that easy_install does. Specifically:
* It cannot install from eggs. That’s not a problem anymore though because pip
supports the superior binary `wheel format
<https://wheel.readthedocs.org/en/latest/>`_ since the 1.4 release.
* It is incompatible with some packages that extensively customize distutils
or setuptools in their ``setup.py`` files.
buildout
--------
If you are using `zc.buildout
<http://pypi.python.org/pypi/zc.buildout>`_ you should look at
`gp.recipe.pip <http://pypi.python.org/pypi/gp.recipe.pip>`_ as an
option to use pip and virtualenv in your buildouts.
==========
Usage
==========
pip
---
Usage
*****
::
pip <command> [options]
Options
*******
.. _`General Options`:
**General Options:**
.. pip-general-options::
.. _`Package Index Options`:
**Package Index Options:**
.. pip-index-options::
.. _`pip install`:
pip install
-----------
Usage
********
.. pip-command-usage:: install
Description
***********
.. pip-command-description:: install
Options
*******
**Install Options:**
.. pip-command-options:: install
**Other Options:**
* :ref:`Package Index Options <Package Index Options>`
* :ref:`General Options <General Options>`
.. _`pip install Examples`:
Examples
********
1) Install `SomePackage` and it's dependencies from `PyPI`_ using :ref:`Requirement Specifiers`
::
$ pip install SomePackage # latest version
$ pip install SomePackage==1.0.4 # specific version
$ pip install 'SomePackage>=1.0.4' # minimum version
2) Install a list of requirements specified in a file. See the :ref:`Cookbook entry on Requirements files <Requirements Files>`.
::
$ pip install -r requirements.txt
3) Upgrade an already installed `SomePackage` to the latest from PyPI.
::
$ pip install --upgrade SomePackage
4) Install a local project in "editable" mode. See the section on :ref:`Editable Installs <editable-installs>`.
::
$ pip install -e . # project in current directory
$ pip install -e path/to/project # project in another directory
5) Install a project from VCS in "editable" mode. See the sections on :ref:`VCS Support <VCS Support>` and :ref:`Editable Installs <editable-installs>`.
::
$ pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
$ pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
$ pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
$ pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
$ pip install -e git+https://git.repo/some_repo.git@egg=subdir&subdirectory=subdir_path # install a python package from a repo subdirectory
6) Install a package with `setuptools extras`_.
::
$ pip install SomePackage[PDF]
$ pip install SomePackage[PDF]==3.0
$ pip install -e .[PDF]==3.0 # editable project in current directory
7) Install a particular source archive file.
::
$ pip install ./downloads/SomePackage-1.0.4.tar.gz
$ pip install http://my.package.repo/SomePackage-1.0.4.zip
8) Install from alternative package repositories.
Install from a different index, and not `PyPI`_::
$ pip install --index-url http://my.package.repo/simple/ SomePackage
Search an additional index during install, in addition to `PyPI`_::
$ pip install --extra-index-url http://my.package.repo/simple SomePackage
Install from a local flat directory containing archives (and don't scan indexes)::
$ pip install --no-index --find-links=file:///local/dir/ SomePackage
$ pip install --no-index --find-links=/local/dir/ SomePackage
$ pip install --no-index --find-links=relative/dir/ SomePackage
9) Find pre-release and development versions, in addition to stable versions. By default, pip only finds stable versions.
::
$ pip install --pre SomePackage
.. _PyPI: http://pypi.python.org/pypi
.. _setuptools extras: http://packages.python.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
pip uninstall
-------------
Usage
*****
.. pip-command-usage:: uninstall
Description
***********
.. pip-command-description:: uninstall
Options
*******
**Uninstall Options:**
.. pip-command-options:: uninstall
**Other Options:**
* :ref:`General Options <General Options>`
Examples
********
1) Uninstall a package.
::
$ pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
.. _`pip freeze`:
pip freeze
-----------
Usage
*****
.. pip-command-usage:: freeze
Description
***********
.. pip-command-description:: freeze
Options
*******
**Freeze Options:**
.. pip-command-options:: freeze
**Other Options:**
* :ref:`General Options <General Options>`
Examples
********
1) Generate output suitable for a requirements file.
::
$ pip freeze
Jinja2==2.6
Pygments==1.5
Sphinx==1.1.3
docutils==0.9.1
2) Generate a requirements file and then install from it in another environment.
::
$ env1/bin/pip freeze > requirements.txt
$ env2/bin/pip install -r requirements.txt
pip list
---------
Usage
*****
.. pip-command-usage:: list
Description
***********
.. pip-command-description:: list
Options
*******
**List Options:**
.. pip-command-options:: list
**Other Options:**
* :ref:`Package Index Options <Package Index Options>`
* :ref:`General Options <General Options>`
Examples
********
1) List installed packages.
::
$ pip list
Pygments (1.5)
docutils (0.9.1)
Sphinx (1.1.2)
Jinja2 (2.6)
2) List outdated packages (excluding editables), and the latest version available
::
$ pip list --outdated
docutils (Current: 0.9.1 Latest: 0.10)
Sphinx (Current: 1.1.2 Latest: 1.1.3)
pip show
--------
Usage
*****
.. pip-command-usage:: show
Description
***********
.. pip-command-description:: show
Options
*******
**Show Options:**
.. pip-command-options:: show
**Other Options:**
* :ref:`General Options <General Options>`
Examples
********
1. Show information about a package:
::
$ pip show sphinx
---
Name: Sphinx
Version: 1.1.3
Location: /my/env/lib/pythonx.x/site-packages
Requires: Pygments, Jinja2, docutils
pip search
----------
Usage
*****
.. pip-command-usage:: search
Description
***********
.. pip-command-description:: search
Options
*******
**Search Options:**
.. pip-command-options:: search
**Other Options:**
* :ref:`General Options <General Options>`
Examples
********
1. Search for "peppercorn"
::
$ pip search peppercorn
pepperedform - Helpers for using peppercorn with formprocess.
peppercorn - A library for converting a token stream into [...]
.. _`pip wheel`:
pip wheel
---------
Usage
*****
.. pip-command-usage:: wheel
Description
***********
.. pip-command-description:: wheel
.. warning::
Currently, when ``pip wheel`` finds a wheel for one of your requirements
already on PyPI, it does not rebuild, and it does not place the file in your
wheelhouse dir. There is an issue open to change this
(https://github.com/pypa/pip/issues/1310)
Options
*******
**Wheel Options:**
.. pip-command-options:: wheel
**Other Options:**
* :ref:`Package Index Options <Package Index Options>`
* :ref:`General Options <General Options>`
Examples
********
1. Build wheels for a requirement (and all its dependencies), and then install
::
$ pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
$ pip install --no-index --find-links=/tmp/wheelhouse SomePackage
pip zip
-------
Usage
*****
.. pip-command-usage:: zip
Description
***********
.. pip-command-description:: zip
Options
*******
**Zip Options:**
.. pip-command-options:: zip
**Other Options:**
* :ref:`General Options <General Options>`
Changelog **1.5.4 (2014-02-21)**
=========
* Correct deprecation warning for ``pip install --build`` to only notify when
the `--build` value is different than the default.
**1.5.3 (2014-02-20)**
* **DEPRECATION** ``pip install --build`` and ``pip install --no-clean`` are now
deprecated. See Issue #906 for discussion.
* Fixed #1112. Couldn't download directly from wheel paths/urls, and when wheel
downloads did occur using requirement specifiers, dependencies weren't
downloaded (PR #1527)
* Fixed #1320. ``pip wheel`` was not downloading wheels that already existed (PR
#1524)
* Fixed #1111. ``pip install --download`` was failing using local
``--find-links`` (PR #1524)
* Workaround for Python bug http://bugs.python.org/issue20053 (PR #1544)
* Don't pass a unicode __file__ to setup.py on Python 2.x (PR #1583)
* Verify that the Wheel version is compatible with this pip (PR #1569)
**1.5.2 (2014-01-26)**
1.5.2 (2014-01-26)
------------------
* Upgraded the vendored ``pkg_resources`` and ``_markerlib`` to setuptools 2.1. * Upgraded the vendored ``pkg_resources`` and ``_markerlib`` to setuptools 2.1.
...@@ -13,8 +40,8 @@ Changelog ...@@ -13,8 +40,8 @@ Changelog
part of the URL in a requirements file part of the URL in a requirements file
1.5.1 (2014-01-20) **1.5.1 (2014-01-20)**
------------------
* pip now only requires setuptools (any setuptools, not a certain version) when * pip now only requires setuptools (any setuptools, not a certain version) when
installing distributions from src (i.e. not from wheel). (Pull #1434). installing distributions from src (i.e. not from wheel). (Pull #1434).
...@@ -32,9 +59,8 @@ Changelog ...@@ -32,9 +59,8 @@ Changelog
#1457) #1457)
**1.5 (2014-01-01)**
1.5 (2014-01-01)
----------------
* **BACKWARD INCOMPATIBLE** pip no longer supports the ``--use-mirrors``, * **BACKWARD INCOMPATIBLE** pip no longer supports the ``--use-mirrors``,
``-M``, and ``--mirrors`` flags. The mirroring support has been removed. In ``-M``, and ``--mirrors`` flags. The mirroring support has been removed. In
...@@ -110,11 +136,9 @@ Changelog ...@@ -110,11 +136,9 @@ Changelog
(Pull #1316) (Pull #1316)
**1.4.1 (2013-08-07)**
1.4.1 (2013-08-07)
------------------
* **New Signing Key** Release 1.4.1 is using a different key than normal with * **New Signing Key** Release 1.4.1 is using a different key than normal with
fingerprint: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA fingerprint: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
* Fixed issues with installing from pybundle files (Pull #1116). * Fixed issues with installing from pybundle files (Pull #1116).
...@@ -125,8 +149,8 @@ Changelog ...@@ -125,8 +149,8 @@ Changelog
* Fixes related to recognizing and cleaning global build dirs (Pull #1080). * Fixes related to recognizing and cleaning global build dirs (Pull #1080).
1.4 (2013-07-23) **1.4 (2013-07-23)**
----------------
* **BACKWARD INCOMPATIBLE** pip now only installs stable versions by default, * **BACKWARD INCOMPATIBLE** pip now only installs stable versions by default,
and offers a new ``--pre`` option to also find pre-release and development and offers a new ``--pre`` option to also find pre-release and development
...@@ -174,14 +198,16 @@ Changelog ...@@ -174,14 +198,16 @@ Changelog
* Fixed git VCS backend with git 1.8.3. (Pull #967) * Fixed git VCS backend with git 1.8.3. (Pull #967)
1.3.1 (2013-03-08)
------------------ **1.3.1 (2013-03-08)**
* Fixed a major backward incompatible change of parsing URLs to externally * Fixed a major backward incompatible change of parsing URLs to externally
hosted packages that got accidentily included in 1.3. hosted packages that got accidentily included in 1.3.
1.3 (2013-03-07)
---------------- **1.3 (2013-03-07)**
* SSL Cert Verification; Make https the default for PyPI access. * SSL Cert Verification; Make https the default for PyPI access.
Thanks James Cleveland, Giovanni Bajo, Marcus Smith and many others (Pull #791, CVE-2013-1629). Thanks James Cleveland, Giovanni Bajo, Marcus Smith and many others (Pull #791, CVE-2013-1629).
...@@ -237,15 +263,17 @@ Changelog ...@@ -237,15 +263,17 @@ Changelog
like the same option in distutils but also plays nice with pip's egg-info. like the same option in distutils but also plays nice with pip's egg-info.
Thanks Przemek Wrzos. (Issue #253 / Pull #693) Thanks Przemek Wrzos. (Issue #253 / Pull #693)
1.2.1 (2012-09-06)
------------------ **1.2.1 (2012-09-06)**
* Fixed a regression introduced in 1.2 about raising an exception when * Fixed a regression introduced in 1.2 about raising an exception when
not finding any files to uninstall in the current environment. Thanks for not finding any files to uninstall in the current environment. Thanks for
the fix, Marcus Smith. the fix, Marcus Smith.
1.2 (2012-09-01)
---------------- **1.2 (2012-09-01)**
* **Dropped support for Python 2.4** The minimum supported Python version is * **Dropped support for Python 2.4** The minimum supported Python version is
now Python 2.5. now Python 2.5.
...@@ -313,8 +341,9 @@ Changelog ...@@ -313,8 +341,9 @@ Changelog
* Added a better help formatter. * Added a better help formatter.
1.1 (2012-02-16)
---------------- **1.1 (2012-02-16)**
* Fixed issue #326 - don't crash when a package's setup.py emits UTF-8 and * Fixed issue #326 - don't crash when a package's setup.py emits UTF-8 and
then fails. Thanks Marc Abramowitz. then fails. Thanks Marc Abramowitz.
...@@ -373,8 +402,8 @@ Changelog ...@@ -373,8 +402,8 @@ Changelog
requirements from VCS that have a changed repo URL. requirements from VCS that have a changed repo URL.
1.0.2 (2011-07-16) **1.0.2 (2011-07-16)**
------------------
* Fixed docs issues. * Fixed docs issues.
* Fixed issue #295 - Reinstall a package when using the ``install -I`` option * Fixed issue #295 - Reinstall a package when using the ``install -I`` option
...@@ -383,8 +412,9 @@ Changelog ...@@ -383,8 +412,9 @@ Changelog
* Fixed issue #314 - Correctly handle exceptions on Python3. * Fixed issue #314 - Correctly handle exceptions on Python3.
* Fixed issue #320 - Correctly parse ``--editable`` lines in requirements files * Fixed issue #320 - Correctly parse ``--editable`` lines in requirements files
1.0.1 (2011-04-30)
------------------ **1.0.1 (2011-04-30)**
* Start to use git-flow. * Start to use git-flow.
* Fixed issue #274 - `find_command` should not raise AttributeError * Fixed issue #274 - `find_command` should not raise AttributeError
...@@ -394,8 +424,9 @@ Changelog ...@@ -394,8 +424,9 @@ Changelog
* Fixed issue #44 - multiple CLI searches. * Fixed issue #44 - multiple CLI searches.
* Fixed issue #266 - current working directory when running setup.py clean. * Fixed issue #266 - current working directory when running setup.py clean.
1.0 (2011-04-04)
---------------- **1.0 (2011-04-04)**
* Added Python 3 support! Huge thanks to Vinay Sajip, Vitaly Babiy, Kelsey * Added Python 3 support! Huge thanks to Vinay Sajip, Vitaly Babiy, Kelsey
Hightower, and Alex Gronholm, among others. Hightower, and Alex Gronholm, among others.
...@@ -422,8 +453,9 @@ Changelog ...@@ -422,8 +453,9 @@ Changelog
Make sure you have `distribute <http://pypi.python.org/pypi/distribute>`_ Make sure you have `distribute <http://pypi.python.org/pypi/distribute>`_
installed before using the installer! installed before using the installer!
0.8.3
----- **0.8.3**
* Moved main repository to Github: https://github.com/pypa/pip * Moved main repository to Github: https://github.com/pypa/pip
...@@ -445,8 +477,9 @@ Changelog ...@@ -445,8 +477,9 @@ Changelog
* Fixed bug in version string parsing related to the suffix "-dev". * Fixed bug in version string parsing related to the suffix "-dev".
0.8.2
----- **0.8.2**
* Avoid redundant unpacking of bundles (from pwaller) * Avoid redundant unpacking of bundles (from pwaller)
...@@ -462,8 +495,9 @@ Changelog ...@@ -462,8 +495,9 @@ Changelog
* Added ``git+https://`` scheme to Git VCS backend. * Added ``git+https://`` scheme to Git VCS backend.
0.8.1
----- **0.8.1**
* Added global --user flag as shortcut for --install-option="--user". From * Added global --user flag as shortcut for --install-option="--user". From
Ronny Pfannschmidt. Ronny Pfannschmidt.
...@@ -482,9 +516,8 @@ Changelog ...@@ -482,9 +516,8 @@ Changelog
Thanks Ronny Pfannschmidt and Wil Tan. Thanks Ronny Pfannschmidt and Wil Tan.
**0.8**
0.8
---
* Track which ``build/`` directories pip creates, never remove directories * Track which ``build/`` directories pip creates, never remove directories
it doesn't create. From Hugo Lopes Tavares. it doesn't create. From Hugo Lopes Tavares.
...@@ -510,14 +543,16 @@ Changelog ...@@ -510,14 +543,16 @@ Changelog
* Significant test framework changes, from Hugo Lopes Tavares. * Significant test framework changes, from Hugo Lopes Tavares.
0.7.2
----- **0.7.2**
* Set zip_safe=False to avoid problems some people are encountering where * Set zip_safe=False to avoid problems some people are encountering where
pip is installed as a zip file. pip is installed as a zip file.
0.7.1
----- **0.7.1**
* Fixed opening of logfile with no directory name. Thanks Alexandre Conrad. * Fixed opening of logfile with no directory name. Thanks Alexandre Conrad.
...@@ -526,8 +561,9 @@ Changelog ...@@ -526,8 +561,9 @@ Changelog
* Tests now require at least ScriptTest 1.0.3. * Tests now require at least ScriptTest 1.0.3.
0.7
--- **0.7**
* Fixed uninstallation on Windows * Fixed uninstallation on Windows
* Added ``pip search`` command. * Added ``pip search`` command.
...@@ -568,21 +604,24 @@ Changelog ...@@ -568,21 +604,24 @@ Changelog
--extra-index-url. --extra-index-url.
* Leftover build directories are now removed. Thanks Alexandre Conrad. * Leftover build directories are now removed. Thanks Alexandre Conrad.
0.6.3
----- **0.6.3**
* Fixed import error on Windows with regard to the backwards compatibility * Fixed import error on Windows with regard to the backwards compatibility
package package
0.6.2
----- **0.6.2**
* Fixed uninstall when /tmp is on a different filesystem. * Fixed uninstall when /tmp is on a different filesystem.
* Fixed uninstallation of distributions with namespace packages. * Fixed uninstallation of distributions with namespace packages.
0.6.1
----- **0.6.1**
* Added support for the ``https`` and ``http-static`` schemes to the * Added support for the ``https`` and ``http-static`` schemes to the
Mercurial and ``ftp`` scheme to the Bazaar backend. Mercurial and ``ftp`` scheme to the Bazaar backend.
...@@ -595,8 +634,9 @@ Changelog ...@@ -595,8 +634,9 @@ Changelog
* Fixed issue with ``pip bundle`` and local files (which weren't being * Fixed issue with ``pip bundle`` and local files (which weren't being
copied into the bundle), from Whit Morriss. copied into the bundle), from Whit Morriss.
0.6
--- **0.6**
* Add ``pip uninstall`` and uninstall-before upgrade (from Carl * Add ``pip uninstall`` and uninstall-before upgrade (from Carl
Meyer). Meyer).
...@@ -626,13 +666,15 @@ Changelog ...@@ -626,13 +666,15 @@ Changelog
* Creates download cache directory if not existing. * Creates download cache directory if not existing.
0.5.1
----- **0.5.1**
* Fixed a couple little bugs, with git and with extensions. * Fixed a couple little bugs, with git and with extensions.
0.5
--- **0.5**
* Added ability to override the default log file name (``pip-log.txt``) * Added ability to override the default log file name (``pip-log.txt``)
with the environmental variable ``$PIP_LOG_FILE``. with the environmental variable ``$PIP_LOG_FILE``.
...@@ -684,8 +726,9 @@ Changelog ...@@ -684,8 +726,9 @@ Changelog
* Fixed handling of attempt to checkout editable install to a * Fixed handling of attempt to checkout editable install to a
non-empty, non-repo directory. non-empty, non-repo directory.
0.4
--- **0.4**
* Make ``-e`` work better with local hg repositories * Make ``-e`` work better with local hg repositories
...@@ -713,8 +756,9 @@ Changelog ...@@ -713,8 +756,9 @@ Changelog
* Fixed support for Subversion 1.6. * Fixed support for Subversion 1.6.
0.3.1
----- **0.3.1**
* Improved virtualenv restart and various path/cleanup problems on win32. * Improved virtualenv restart and various path/cleanup problems on win32.
...@@ -726,8 +770,9 @@ Changelog ...@@ -726,8 +770,9 @@ Changelog
* Improve ``pip -h`` * Improve ``pip -h``
0.3
--- **0.3**
* Added support for editable packages created from Git, Mercurial and Bazaar * Added support for editable packages created from Git, Mercurial and Bazaar
repositories and ability to freeze them. Refactored support for version repositories and ability to freeze them. Refactored support for version
...@@ -763,8 +808,9 @@ Changelog ...@@ -763,8 +808,9 @@ Changelog
* Add ``--simulate`` option to ``pip zip``. * Add ``--simulate`` option to ``pip zip``.
0.2.1
----- **0.2.1**
* Fixed small problem that prevented using ``pip.py`` without actually * Fixed small problem that prevented using ``pip.py`` without actually
installing pip. installing pip.
...@@ -783,8 +829,9 @@ Changelog ...@@ -783,8 +829,9 @@ Changelog
* Turn some tar file errors into warnings. * Turn some tar file errors into warnings.
0.2
--- **0.2**
* Renamed to ``pip``, and to install you now do ``pip install * Renamed to ``pip``, and to install you now do ``pip install
PACKAGE`` PACKAGE``
...@@ -797,8 +844,9 @@ Changelog ...@@ -797,8 +844,9 @@ Changelog
creating a bundle using unnamed packages (like just an svn creating a bundle using unnamed packages (like just an svn
repository without ``#egg=Package``). repository without ``#egg=Package``).
0.1.4
----- **0.1.4**
* Added an option ``--install-option`` to pass options to pass * Added an option ``--install-option`` to pass options to pass
arguments to ``setup.py install`` arguments to ``setup.py install``
...@@ -824,16 +872,18 @@ Changelog ...@@ -824,16 +872,18 @@ Changelog
is still required, but just some downloads will be avoided when is still required, but just some downloads will be avoided when
using this. using this.
0.1.3
----- **0.1.3**
* Always use ``svn checkout`` (not ``export``) so that * Always use ``svn checkout`` (not ``export``) so that
``tag_svn_revision`` settings give the revision of the package. ``tag_svn_revision`` settings give the revision of the package.
* Don't update checkouts that came from ``.pybundle`` files. * Don't update checkouts that came from ``.pybundle`` files.
0.1.2
----- **0.1.2**
* Improve error text when there are errors fetching HTML pages when * Improve error text when there are errors fetching HTML pages when
seeking packages. seeking packages.
...@@ -846,8 +896,9 @@ Changelog ...@@ -846,8 +896,9 @@ Changelog
* Fix ``dependency_links`` for finding packages. * Fix ``dependency_links`` for finding packages.
0.1.1
----- **0.1.1**
* Fixed a NameError exception when running pip outside of a * Fixed a NameError exception when running pip outside of a
virtualenv environment. virtualenv environment.
...@@ -857,7 +908,8 @@ Changelog ...@@ -857,7 +908,8 @@ Changelog
* Fixed use of ``hashlib.md5`` on python2.5+ (also from Prabhu * Fixed use of ``hashlib.md5`` on python2.5+ (also from Prabhu
Ramachandran) Ramachandran)
0.1
--- **0.1**
* Initial release * Initial release
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: pip Name: pip
Version: 1.5.2 Version: 1.5.4
Summary: A tool for installing and managing Python packages. Summary: A tool for installing and managing Python packages.
Home-page: http://www.pip-installer.org Home-page: http://www.pip-installer.org
Author: The pip developers Author: The pip developers
...@@ -16,16 +16,19 @@ Description: ...@@ -16,16 +16,19 @@ Description:
* Bug Tracking: https://github.com/pypa/pip/issues * Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv * Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: http://www.pip-installer.org/ * Docs: http://www.pip-installer.org/
* IRC: #pip on Freenode. * User IRC: #pip on Freenode.
* Dev IRC: #pypa on Freenode.
Quickstart Quickstart
========== ==========
Install a package: First, :doc:`Install pip <installing>`.
Install a package from `PyPI`_:
:: ::
$ pip install SomePackage==1.0 $ pip install SomePackage
[...] [...]
Successfully installed SomePackage Successfully installed SomePackage
...@@ -71,6 +74,8 @@ Description: ...@@ -71,6 +74,8 @@ Description:
Successfully uninstalled SomePackage Successfully uninstalled SomePackage
.. _PyPI: http://pypi.python.org/pypi/
Keywords: easy_install distutils setuptools egg virtualenv Keywords: easy_install distutils setuptools egg virtualenv
Platform: UNKNOWN Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable Classifier: Development Status :: 5 - Production/Stable
......
...@@ -7,4 +7,5 @@ Project Info ...@@ -7,4 +7,5 @@ Project Info
* Bug Tracking: https://github.com/pypa/pip/issues * Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv * Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: http://www.pip-installer.org/ * Docs: http://www.pip-installer.org/
* IRC: #pip on Freenode. * User IRC: #pip on Freenode.
* Dev IRC: #pypa on Freenode.
:orphan:
Configuration
=============
This content is now covered in the :doc:`User Guide <user_guide>`
:orphan:
============
Cookbook
============
This content is now covered in the :doc:`User Guide <user_guide>`
:orphan:
"ImportError: No module named setuptools"
+++++++++++++++++++++++++++++++++++++++++
Although using ``pip install --upgrade setuptools`` to upgrade from distribute
to setuptools works in isolation, it's possible to get "ImportError: No module
named setuptools" when using pip<1.4 to upgrade a package that depends on
setuptools or distribute.
e.g. when running a command like this: `pip install --upgrade pyramid`
Solution
~~~~~~~~
To prevent the problem in *new* environments (that aren't broken yet):
* Option 1:
* *First* run `pip install -U setuptools`,
* *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)
* Option 2:
* Upgrade pip using :ref:`get-pip <get-pip>`
* *Then* run the command to upgrade your package (e.g. `pip install --upgrade pyramid`)
To fix the problem once it's occurred, you'll need to manually install the new
setuptools, then rerun the upgrade that failed.
1. Download `ez_setup.py` (https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py)
2. Run `python ez_setup.py`
3. Then rerun your upgrade (e.g. `pip install --upgrade pyramid`)
Cause
~~~~~
distribute-0.7.3 is just an empty wrapper that only serves to require the new
setuptools (setuptools>=0.7) so that it will be installed. (If you don't know
yet, the "new setuptools" is a merge of distribute and setuptools back into one
project).
distribute-0.7.3 does its job well, when the upgrade is done in isolation.
E.g. if you're currently on distribute-0.6.X, then running `pip install -U
setuptools` works fine to upgrade you to setuptools>=0.7.
The problem occurs when:
1. you are currently using an older distribute (i.e. 0.6.X)
2. and you try to use pip to upgrade a package that *depends* on setuptools or
distribute.
As part of the upgrade process, pip builds an install list that ends up
including distribute-0.7.3 and setuptools>=0.7 , but they can end up being
separated by other dependencies in the list, so what can happen is this:
1. pip uninstalls the existing distribute
2. pip installs distribute-0.7.3 (which has no importable setuptools, that pip
*needs* internally to function)
3. pip moves on to install another dependency (before setuptools>=0.7) and is
unable to proceed without the setuptools package
Note that pip v1.4 has fixes to prevent this. distribute-0.7.3 (or
setuptools>=0.7) by themselves cannot prevent this kind of problem.
.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _distribute: https://pypi.python.org/pypi/distribute
pip pip
=== ===
A tool for installing and managing Python packages.
`User list <http://groups.google.com/group/python-virtualenv>`_ | `User list <http://groups.google.com/group/python-virtualenv>`_ |
`Dev list <http://groups.google.com/group/pypa-dev>`_ | `Dev list <http://groups.google.com/group/pypa-dev>`_ |
`Issues <https://github.com/pypa/pip/issues>`_ |
`Github <https://github.com/pypa/pip>`_ | `Github <https://github.com/pypa/pip>`_ |
`PyPI <https://pypi.python.org/pypi/pip/>`_ | `PyPI <https://pypi.python.org/pypi/pip/>`_ |
irc:#pip User IRC: #pip |
Dev IRC: #pypa
The `PyPA recommended
<https://python-packaging-user-guide.readthedocs.org/en/latest/current.html>`_
tool for installing and managing Python packages.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
quickstart quickstart
installing installing
usage user_guide
cookbook reference/index
logic
configuration
other-tools
development development
news news
...@@ -27,11 +27,10 @@ Then run the following (which may require administrator access):: ...@@ -27,11 +27,10 @@ Then run the following (which may require administrator access)::
$ python get-pip.py $ python get-pip.py
.. note:: If `setuptools`_ (or `distribute`_) is not already installed, ``get-pip.py`` will
install `setuptools`_ for you. [2]_
Beginning with v1.5.1, pip does not require `setuptools`_ prior to running To upgrade an existing `setuptools`_ (or `distribute`_), run ``pip install -U setuptools`` [3]_
`get-pip.py`. Additionally, if `setuptools`_ (or `distribute`_) is not
already installed, `get-pip.py` will install `setuptools`_ for you.
Using Package Managers Using Package Managers
...@@ -54,7 +53,14 @@ On Fedora:: ...@@ -54,7 +53,14 @@ On Fedora::
tool like `curl` that verifies SSL certificates when downloading from tool like `curl` that verifies SSL certificates when downloading from
https URLs. https URLs.
.. _setuptools: https://pypi.python.org/pypi/setuptools .. [2] Beginning with pip v1.5.1, ``get-pip.py`` stopped requiring setuptools to
.. _distribute: https://pypi.python.org/pypi/distribute be installed first.
.. [3] Although using ``pip install --upgrade setuptools`` to upgrade from
distribute to setuptools works in isolation, it's possible to get
"ImportError: No module named setuptools" when using pip<1.4 to upgrade a
package that depends on setuptools or distribute. See :doc:`here for
details <distribute_setuptools>`.
.. _setuptools: https://pypi.python.org/pypi/setuptools
.. _distribute: https://pypi.python.org/pypi/distribute
:orphan:
================
Internal Details
================
This content is now covered in the :doc:`Reference Guide <reference/index>`
==== =============
News Release Notes
==== =============
.. include:: ../CHANGES.txt .. include:: ../CHANGES.txt
Quickstart Quickstart
========== ==========
Install a package: First, :doc:`Install pip <installing>`.
Install a package from `PyPI`_:
:: ::
$ pip install SomePackage==1.0 $ pip install SomePackage
[...] [...]
Successfully installed SomePackage Successfully installed SomePackage
...@@ -50,3 +52,5 @@ Uninstall a package: ...@@ -50,3 +52,5 @@ Uninstall a package:
Proceed (y/n)? y Proceed (y/n)? y
Successfully uninstalled SomePackage Successfully uninstalled SomePackage
.. _PyPI: http://pypi.python.org/pypi/
===============
Reference Guide
===============
.. toctree::
:maxdepth: 2
pip
pip_install
pip_uninstall
pip_freeze
pip_list
pip_show
pip_search
pip_wheel
pip
---
.. contents::
Usage
*****
::
pip <command> [options]
Description
***********
.. _`Logging`:
Logging
=======
Console logging
~~~~~~~~~~~~~~~
pip offers :ref:`-v, --verbose <--verbose>` and :ref:`-q, --quiet <--quiet>`
to control the console log level. Each option can be used multiple times and
used together. One ``-v`` increases the verbosity by one, whereas one ``-q`` decreases it by
one.
The series of log levels, in order, are as follows::
VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL
``NOTIFY`` is the default level.
A few examples on how the parameters work to affect the level:
* specifying nothing results in ``NOTIFY``
* ``-v`` results in ``INFO``
* ``-vv`` results in ``DEBUG``
* ``-q`` results in ``WARN``
* ``-vq`` results in ``NOTIFY``
The most practical use case for users is either ``-v`` or ``-vv`` to see
additional logging to help troubleshoot an issue.
.. _`FileLogging`:
File logging
~~~~~~~~~~~~
pip offers the :ref:`--log <--log>` option for specifying a file where a maximum
verbosity log will be kept. This option is empty by default. This log appends
to previous logging.
Additionally, when commands fail (i.e. return a non-zero exit code), pip writes
a "failure log" for the failed command. This log overwrites previous
logging. The default location is as follows:
* On Unix and Mac OS X: :file:`$HOME/.pip/pip.log`
* On Windows, the configuration file is: :file:`%HOME%\\pip\\pip.log`
The option for the failure log, is :ref:`--log-file <--log-file>`.
Both logs add a line per execution to specify the date and what pip executable wrote the log.
Like all pip options, ``--log`` and ``log-file``, can also be set as an environment
variable, or placed into the pip config file. See the :ref:`Configuration`
section.
.. _`General Options`:
General Options
***************
.. pip-general-options::
.. _`pip freeze`:
pip freeze
-----------
.. contents::
Usage
*****
.. pip-command-usage:: freeze
Description
***********
.. pip-command-description:: freeze
Options
*******
.. pip-command-options:: freeze
Examples
********
1) Generate output suitable for a requirements file.
::
$ pip freeze
Jinja2==2.6
Pygments==1.5
Sphinx==1.1.3
docutils==0.9.1
2) Generate a requirements file and then install from it in another environment.
::
$ env1/bin/pip freeze > requirements.txt
$ env2/bin/pip install -r requirements.txt
.. _`pip list`:
pip list
---------
.. contents::
Usage
*****
.. pip-command-usage:: list
Description
***********
.. pip-command-description:: list
Options
*******
.. pip-command-options:: list
.. pip-index-options::
Examples
********
1) List installed packages.
::
$ pip list
Pygments (1.5)
docutils (0.9.1)
Sphinx (1.1.2)
Jinja2 (2.6)
2) List outdated packages (excluding editables), and the latest version available
::
$ pip list --outdated
docutils (Current: 0.9.1 Latest: 0.10)
Sphinx (Current: 1.1.2 Latest: 1.1.3)
.. _`pip search`:
pip search
----------
.. contents::
Usage
*****
.. pip-command-usage:: search
Description
***********
.. pip-command-description:: search
Options
*******
.. pip-command-options:: search
Examples
********
1. Search for "peppercorn"
::
$ pip search peppercorn
pepperedform - Helpers for using peppercorn with formprocess.
peppercorn - A library for converting a token stream into [...]
.. _`pip wheel`:
.. _`pip show`:
pip show
--------
.. contents::
Usage
*****
.. pip-command-usage:: show
Description
***********
.. pip-command-description:: show
Options
*******
.. pip-command-options:: show
Examples
********
1. Show information about a package:
::
$ pip show sphinx
---
Name: Sphinx
Version: 1.1.3
Location: /my/env/lib/pythonx.x/site-packages
Requires: Pygments, Jinja2, docutils
.. _`pip uninstall`:
pip uninstall
-------------
.. contents::
Usage
*****
.. pip-command-usage:: uninstall
Description
***********
.. pip-command-description:: uninstall
Options
*******
.. pip-command-options:: uninstall
Examples
********
1) Uninstall a package.
::
$ pip uninstall simplejson
Uninstalling simplejson:
/home/me/env/lib/python2.7/site-packages/simplejson
/home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
Proceed (y/n)? y
Successfully uninstalled simplejson
.. _`pip wheel`:
pip wheel
---------
.. contents::
Usage
*****
.. pip-command-usage:: wheel
Description
***********
.. pip-command-description:: wheel
Options
*******
.. pip-command-options:: wheel
.. pip-index-options::
Examples
********
1. Build wheels for a requirement (and all its dependencies), and then install
::
$ pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
$ pip install --no-index --find-links=/tmp/wheelhouse SomePackage
:orphan:
==========
Usage
==========
The "Usage" section is now covered in the :doc:`Reference Guide <reference/index>`
Metadata-Version: 1.1 Metadata-Version: 1.1
Name: pip Name: pip
Version: 1.5.2 Version: 1.5.4
Summary: A tool for installing and managing Python packages. Summary: A tool for installing and managing Python packages.
Home-page: http://www.pip-installer.org Home-page: http://www.pip-installer.org
Author: The pip developers Author: The pip developers
...@@ -16,16 +16,19 @@ Description: ...@@ -16,16 +16,19 @@ Description:
* Bug Tracking: https://github.com/pypa/pip/issues * Bug Tracking: https://github.com/pypa/pip/issues
* Mailing list: http://groups.google.com/group/python-virtualenv * Mailing list: http://groups.google.com/group/python-virtualenv
* Docs: http://www.pip-installer.org/ * Docs: http://www.pip-installer.org/
* IRC: #pip on Freenode. * User IRC: #pip on Freenode.
* Dev IRC: #pypa on Freenode.
Quickstart Quickstart
========== ==========
Install a package: First, :doc:`Install pip <installing>`.
Install a package from `PyPI`_:
:: ::
$ pip install SomePackage==1.0 $ pip install SomePackage
[...] [...]
Successfully installed SomePackage Successfully installed SomePackage
...@@ -71,6 +74,8 @@ Description: ...@@ -71,6 +74,8 @@ Description:
Successfully uninstalled SomePackage Successfully uninstalled SomePackage
.. _PyPI: http://pypi.python.org/pypi/
Keywords: easy_install distutils setuptools egg virtualenv Keywords: easy_install distutils setuptools egg virtualenv
Platform: UNKNOWN Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable Classifier: Development Status :: 5 - Production/Stable
......
...@@ -9,13 +9,23 @@ setup.py ...@@ -9,13 +9,23 @@ setup.py
docs/configuration.rst docs/configuration.rst
docs/cookbook.rst docs/cookbook.rst
docs/development.rst docs/development.rst
docs/distribute_setuptools.rst
docs/index.rst docs/index.rst
docs/installing.rst docs/installing.rst
docs/logic.rst docs/logic.rst
docs/news.rst docs/news.rst
docs/other-tools.rst
docs/quickstart.rst docs/quickstart.rst
docs/usage.rst docs/usage.rst
docs/user_guide.rst
docs/reference/index.rst
docs/reference/pip.rst
docs/reference/pip_freeze.rst
docs/reference/pip_install.rst
docs/reference/pip_list.rst
docs/reference/pip_search.rst
docs/reference/pip_show.rst
docs/reference/pip_uninstall.rst
docs/reference/pip_wheel.rst
pip/__init__.py pip/__init__.py
pip/__main__.py pip/__main__.py
pip/basecommand.py pip/basecommand.py
......
...@@ -19,7 +19,7 @@ import pip.cmdoptions ...@@ -19,7 +19,7 @@ import pip.cmdoptions
cmdoptions = pip.cmdoptions cmdoptions = pip.cmdoptions
# The version as used in the setup.py and the docs conf.py # The version as used in the setup.py and the docs conf.py
__version__ = "1.5.2" __version__ = "1.5.4"
def autocomplete(): def autocomplete():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment