1PIP(1) pip PIP(1)
2
3
4
6 pip - pip 9.0.3
7
8 User list | Dev list | Github | PyPI | User IRC: #pypa | Dev IRC:
9 #pypa-dev
10
11 The PyPA recommended tool for installing Python packages.
12
14 First, Install pip.
15
16 Install a package from PyPI:
17
18 $ pip install SomePackage
19 [...]
20 Successfully installed SomePackage
21
22 Install a package already downloaded from PyPI or got elsewhere. This
23 is useful if the target machine does not have a network connection:
24
25 $ pip install SomePackage-1.0-py2.py3-none-any.whl
26 [...]
27 Successfully installed SomePackage
28
29 Show what files were installed:
30
31 $ pip show --files SomePackage
32 Name: SomePackage
33 Version: 1.0
34 Location: /my/env/lib/pythonx.x/site-packages
35 Files:
36 ../somepackage/__init__.py
37 [...]
38
39 List what packages are outdated:
40
41 $ pip list --outdated
42 SomePackage (Current: 1.0 Latest: 2.0)
43
44 Upgrade a package:
45
46 $ pip install --upgrade SomePackage
47 [...]
48 Found existing installation: SomePackage 1.0
49 Uninstalling SomePackage:
50 Successfully uninstalled SomePackage
51 Running setup.py install for SomePackage
52 Successfully installed SomePackage
53
54 Uninstall a package:
55
56 $ pip uninstall SomePackage
57 Uninstalling SomePackage:
58 /my/env/lib/pythonx.x/site-packages/somepackage
59 Proceed (y/n)? y
60 Successfully uninstalled SomePackage
61
63 Do I need to install pip?
64 pip is already installed if you’re using Python 2 >=2.7.9 or Python 3
65 >=3.4 binaries downloaded from python.org, but you’ll need to upgrade
66 pip.
67
68 Additionally, pip will already be installed if you’re working in a Vir‐
69 tual Environment created by pypug:virtualenv or pyvenv.
70
71 Installing with get-pip.py
72 To install pip, securely download get-pip.py. [2]
73
74 Then run the following:
75
76 python get-pip.py
77
78 WARNING:
79 Be cautious if you’re using a Python install that’s managed by your
80 operating system or another package manager. get-pip.py does not
81 coordinate with those tools, and may leave your system in an incon‐
82 sistent state.
83
84 get-pip.py will also install pypug:setuptools [3] and pypug:wheel, if
85 they’re not already. pypug:setuptools is required to install source
86 distributions. Both are required to be able to build a Wheel cache
87 (which improves installation speed), although neither are required to
88 install pre-built wheels.
89
90 NOTE:
91 The get-pip.py script is supported on the same python version as
92 pip. For the now unsupported Python 3.2, an alternate script is
93 available here.
94
95 get-pip.py options
96 --no-setuptools
97 If set, don’t attempt to install pypug:setuptools
98
99 --no-wheel
100 If set, don’t attempt to install pypug:wheel
101
102 Additionally, get-pip.py supports using the pip install options and the
103 general options. Below are some examples:
104
105 Install from local copies of pip and setuptools:
106
107 python get-pip.py --no-index --find-links=/local/copies
108
109 Install to the user site [4]:
110
111 python get-pip.py --user
112
113 Install behind a proxy:
114
115 python get-pip.py --proxy="[user:passwd@]proxy.server:port"
116
117 Using Linux Package Managers
118 See pypug:Installing pip/setuptools/wheel with Linux Package Managers
119 in the Python Packaging User Guide.
120
121 Upgrading pip
122 On Linux or macOS:
123
124 pip install -U pip
125
126 On Windows [5]:
127
128 python -m pip install -U pip
129
130 Python and OS Compatibility
131 pip works with CPython versions 2.6, 2.7, 3.3, 3.4, 3.5 and also pypy.
132
133 This means pip works on the latest patch version of each of these minor
134 versions (i.e. 2.6.9 for 2.6, etc). Previous patch versions are sup‐
135 ported on a best effort approach.
136
137 pip works on Unix/Linux, macOS, and Windows.
138
139
140 ----
141
142
143
144 [1] For Python 2, see https://docs.python.org/2/installing, and for
145 Python3, see https://docs.python.org/3/installing.
146
147 [2] “Secure” in this context means using a modern browser or a tool
148 like curl that verifies SSL certificates when downloading from
149 https URLs.
150
151 [3] Beginning with pip v1.5.1, get-pip.py stopped requiring setuptools
152 to be installed first.
153
154 [4] The pip developers are considering making --user the default for
155 all installs, including get-pip.py installs of pip, but at this
156 time, --user installs for pip itself, should not be considered to
157 be fully tested or endorsed. For discussion, see Issue 1668.
158
159 [5] https://github.com/pypa/pip/issues/1299
160
162 Contents
163 · User Guide
164
165 · Installing Packages
166
167 · Requirements Files
168
169 · Constraints Files
170
171 · Installing from Wheels
172
173 · Uninstalling Packages
174
175 · Listing Packages
176
177 · Searching for Packages
178
179 · Configuration
180
181 · Config file
182
183 · Environment Variables
184
185 · Config Precedence
186
187 · Command Completion
188
189 · Installing from local packages
190
191 · “Only if needed” Recursive Upgrade
192
193 · User Installs
194
195 · Ensuring Repeatability
196
197 · Pinned Version Numbers
198
199 · Hash-checking Mode
200
201 · Installation Bundles
202
203 Installing Packages
204 pip supports installing from PyPI, version control, local projects, and
205 directly from distribution files.
206
207 The most common scenario is to install from PyPI using Requirement
208 Specifiers
209
210 $ pip install SomePackage # latest version
211 $ pip install SomePackage==1.0.4 # specific version
212 $ pip install 'SomePackage>=1.0.4' # minimum version
213
214 For more information and examples, see the pip install reference.
215
216 Requirements Files
217 “Requirements files” are files containing a list of items to be
218 installed using pip install like so:
219
220 pip install -r requirements.txt
221
222 Details on the format of the files are here: Requirements File Format.
223
224 Logically, a Requirements file is just a list of pip install arguments
225 placed in a file. Note that you should not rely on the items in the
226 file being installed by pip in any particular order.
227
228 In practice, there are 4 common uses of Requirements files:
229
230 1. Requirements files are used to hold the result from pip freeze for
231 the purpose of achieving repeatable installations. In this case,
232 your requirement file contains a pinned version of everything that
233 was installed when pip freeze was run.
234
235 pip freeze > requirements.txt
236 pip install -r requirements.txt
237
238 2. Requirements files are used to force pip to properly resolve depen‐
239 dencies. As it is now, pip doesn’t have true dependency resolution,
240 but instead simply uses the first specification it finds for a
241 project. E.g if pkg1 requires pkg3>=1.0 and pkg2 requires
242 pkg3>=1.0,<=2.0, and if pkg1 is resolved first, pip will only use
243 pkg3>=1.0, and could easily end up installing a version of pkg3 that
244 conflicts with the needs of pkg2. To solve this problem, you can
245 place pkg3>=1.0,<=2.0 (i.e. the correct specification) into your
246 requirements file directly along with the other top level require‐
247 ments. Like so:
248
249 pkg1
250 pkg2
251 pkg3>=1.0,<=2.0
252
253 3. Requirements files are used to force pip to install an alternate
254 version of a sub-dependency. For example, suppose ProjectA in your
255 requirements file requires ProjectB, but the latest version (v1.3)
256 has a bug, you can force pip to accept earlier versions like so:
257
258 ProjectA
259 ProjectB<1.3
260
261 4. Requirements files are used to override a dependency with a local
262 patch that lives in version control. For example, suppose a depen‐
263 dency, SomeDependency from PyPI has a bug, and you can’t wait for an
264 upstream fix. You could clone/copy the src, make the fix, and place
265 it in VCS with the tag sometag. You’d reference it in your require‐
266 ments file with a line like so:
267
268 git+https://myvcs.com/some_dependency@sometag#egg=SomeDependency
269
270 If SomeDependency was previously a top-level requirement in your
271 requirements file, then replace that line with the new line. If
272 SomeDependency is a sub-dependency, then add the new line.
273
274 It’s important to be clear that pip determines package dependencies
275 using install_requires metadata, not by discovering requirements.txt
276 files embedded in projects.
277
278 See also:
279
280 · Requirements File Format
281
282 · pip freeze
283
284 · “setup.py vs requirements.txt” (an article by Donald Stufft)
285
286 Constraints Files
287 Constraints files are requirements files that only control which ver‐
288 sion of a requirement is installed, not whether it is installed or not.
289 Their syntax and contents is nearly identical to Requirements Files.
290 There is one key difference: Including a package in a constraints file
291 does not trigger installation of the package.
292
293 Use a constraints file like so:
294
295 pip install -c constraints.txt
296
297 Constraints files are used for exactly the same reason as requirements
298 files when you don’t know exactly what things you want to install. For
299 instance, say that the “helloworld” package doesn’t work in your envi‐
300 ronment, so you have a local patched version. Some things you install
301 depend on “helloworld”, and some don’t.
302
303 One way to ensure that the patched version is used consistently is to
304 manually audit the dependencies of everything you install, and if “hel‐
305 loworld” is present, write a requirements file to use when installing
306 that thing.
307
308 Constraints files offer a better way: write a single constraints file
309 for your organisation and use that everywhere. If the thing being
310 installed requires “helloworld” to be installed, your fixed version
311 specified in your constraints file will be used.
312
313 Constraints file support was added in pip 7.1.
314
315 Installing from Wheels
316 “Wheel” is a built, archive format that can greatly speed installation
317 compared to building and installing from source archives. For more
318 information, see the Wheel docs , PEP427, and PEP425
319
320 Pip prefers Wheels where they are available. To disable this, use the
321 –no-binary flag for pip install.
322
323 If no satisfactory wheels are found, pip will default to finding source
324 archives.
325
326 To install directly from a wheel archive:
327
328 pip install SomePackage-1.0-py2.py3-none-any.whl
329
330 For the cases where wheels are not available, pip offers pip wheel as a
331 convenience, to build wheels for all your requirements and dependen‐
332 cies.
333
334 pip wheel requires the wheel package to be installed, which provides
335 the “bdist_wheel” setuptools extension that it uses.
336
337 To build wheels for your requirements and all their dependencies to a
338 local directory:
339
340 pip install wheel
341 pip wheel --wheel-dir=/local/wheels -r requirements.txt
342
343 And then to install those requirements just using your local directory
344 of wheels (and not from PyPI):
345
346 pip install --no-index --find-links=/local/wheels -r requirements.txt
347
348 Uninstalling Packages
349 pip is able to uninstall most packages like so:
350
351 $ pip uninstall SomePackage
352
353 pip also performs an automatic uninstall of an old version of a package
354 before upgrading to a newer version.
355
356 For more information and examples, see the pip uninstall reference.
357
358 Listing Packages
359 To list installed packages:
360
361 $ pip list
362 docutils (0.9.1)
363 Jinja2 (2.6)
364 Pygments (1.5)
365 Sphinx (1.1.2)
366
367 To list outdated packages, and show the latest version available:
368
369 $ pip list --outdated
370 docutils (Current: 0.9.1 Latest: 0.10)
371 Sphinx (Current: 1.1.2 Latest: 1.1.3)
372
373 To show details about an installed package:
374
375 $ pip show sphinx
376 ---
377 Name: Sphinx
378 Version: 1.1.3
379 Location: /my/env/lib/pythonx.x/site-packages
380 Requires: Pygments, Jinja2, docutils
381
382 For more information and examples, see the pip list and pip show refer‐
383 ence pages.
384
385 Searching for Packages
386 pip can search PyPI for packages using the pip search command:
387
388 $ pip search "query"
389
390 The query will be used to search the names and summaries of all pack‐
391 ages.
392
393 For more information and examples, see the pip search reference.
394
395 Configuration
396 Config file
397 pip allows you to set all command line option defaults in a standard
398 ini style config file.
399
400 The names and locations of the configuration files vary slightly across
401 platforms. You may have per-user, per-virtualenv or site-wide (shared
402 amongst all users) configuration:
403
404 Per-user:
405
406 · On Unix the default configuration file is: $HOME/.config/pip/pip.conf
407 which respects the XDG_CONFIG_HOME environment variable.
408
409 · On macOS the configuration file is $HOME/Library/Application Sup‐
410 port/pip/pip.conf.
411
412 · On Windows the configuration file is %APPDATA%\pip\pip.ini.
413
414 There are also a legacy per-user configuration file which is also
415 respected, these are located at:
416
417 · On Unix and macOS the configuration file is: $HOME/.pip/pip.conf
418
419 · On Windows the configuration file is: %HOME%\pip\pip.ini
420
421 You can set a custom path location for this config file using the envi‐
422 ronment variable PIP_CONFIG_FILE.
423
424 Inside a virtualenv:
425
426 · On Unix and macOS the file is $VIRTUAL_ENV/pip.conf
427
428 · On Windows the file is: %VIRTUAL_ENV%\pip.ini
429
430 Site-wide:
431
432 · On Unix the file may be located in /etc/pip.conf. Alternatively it
433 may be in a “pip” subdirectory of any of the paths set in the envi‐
434 ronment variable XDG_CONFIG_DIRS (if it exists), for example
435 /etc/xdg/pip/pip.conf.
436
437 · On macOS the file is: /Library/Application Support/pip/pip.conf
438
439 · On Windows XP the file is: C:\Documents and Settings\All Users\Appli‐
440 cation Data\pip\pip.ini
441
442 · On Windows 7 and later the file is hidden, but writeable at C:\Pro‐
443 gramData\pip\pip.ini
444
445 · Site-wide configuration is not supported on Windows Vista
446
447 If multiple configuration files are found by pip then they are combined
448 in the following order:
449
450 1. Firstly the site-wide file is read, then
451
452 2. The per-user file is read, and finally
453
454 3. The virtualenv-specific file is read.
455
456 Each file read overrides any values read from previous files, so if the
457 global timeout is specified in both the site-wide file and the per-user
458 file then the latter value is the one that will be used.
459
460 The names of the settings are derived from the long command line
461 option, e.g. if you want to use a different package index
462 (--index-url) and set the HTTP timeout (--default-timeout) to 60 sec‐
463 onds your config file would look like this:
464
465 [global]
466 timeout = 60
467 index-url = http://download.zope.org/ppix
468
469 Each subcommand can be configured optionally in its own section so that
470 every global setting with the same name will be overridden; e.g.
471 decreasing the timeout to 10 seconds when running the freeze (Freezing
472 Requirements) command and using 60 seconds for all other commands is
473 possible with:
474
475 [global]
476 timeout = 60
477
478 [freeze]
479 timeout = 10
480
481 Boolean options like --ignore-installed or --no-dependencies can be set
482 like this:
483
484 [install]
485 ignore-installed = true
486 no-dependencies = yes
487
488 To enable the boolean options --no-compile and --no-cache-dir, falsy
489 values have to be used:
490
491 [global]
492 no-cache-dir = false
493
494 [install]
495 no-compile = no
496
497 Appending options like --find-links can be written on multiple lines:
498
499 [global]
500 find-links =
501 http://download.example.com
502
503 [install]
504 find-links =
505 http://mirror1.example.com
506 http://mirror2.example.com
507
508 Environment Variables
509 pip’s command line options can be set with environment variables using
510 the format PIP_<UPPER_LONG_NAME> . Dashes (-) have to be replaced with
511 underscores (_).
512
513 For example, to set the default timeout:
514
515 export PIP_DEFAULT_TIMEOUT=60
516
517 This is the same as passing the option to pip directly:
518
519 pip --default-timeout=60 [...]
520
521 To set options that can be set multiple times on the command line, just
522 add spaces in between values. For example:
523
524 export PIP_FIND_LINKS="http://mirror1.example.com http://mirror2.example.com"
525
526 is the same as calling:
527
528 pip install --find-links=http://mirror1.example.com --find-links=http://mirror2.example.com
529
530 Config Precedence
531 Command line options have precedence over environment variables, which
532 have precedence over the config file.
533
534 Within the config file, command specific sections have precedence over
535 the global section.
536
537 Examples:
538
539 · --host=foo overrides PIP_HOST=foo
540
541 · PIP_HOST=foo overrides a config file with [global] host = foo
542
543 · A command specific section in the config file [<command>] host = bar
544 overrides the option with same name in the [global] config file sec‐
545 tion
546
547 Command Completion
548 pip comes with support for command line completion in bash, zsh and
549 fish.
550
551 To setup for bash:
552
553 $ pip completion --bash >> ~/.profile
554
555 To setup for zsh:
556
557 $ pip completion --zsh >> ~/.zprofile
558
559 To setup for fish:
560
561 $ pip completion --fish > ~/.config/fish/completions/pip.fish
562
563 Alternatively, you can use the result of the completion command
564 directly with the eval function of your shell, e.g. by adding the fol‐
565 lowing to your startup file:
566
567 eval "`pip completion --bash`"
568
569 Installing from local packages
570 In some cases, you may want to install from local packages only, with
571 no traffic to PyPI.
572
573 First, download the archives that fulfill your requirements:
574
575 $ pip install --download DIR -r requirements.txt
576
577 Note that pip install --download will look in your wheel cache first,
578 before trying to download from PyPI. If you’ve never installed your
579 requirements before, you won’t have a wheel cache for those items. In
580 that case, if some of your requirements don’t come as wheels from PyPI,
581 and you want wheels, then run this instead:
582
583 $ pip wheel --wheel-dir DIR -r requirements.txt
584
585 Then, to install from local only, you’ll be using –find-links and
586 –no-index like so:
587
588 $ pip install --no-index --find-links=DIR -r requirements.txt
589
590 “Only if needed” Recursive Upgrade
591 pip install --upgrade is currently written to perform an eager recur‐
592 sive upgrade, i.e. it upgrades all dependencies regardless of whether
593 they still satisfy the new parent requirements.
594
595 E.g. supposing:
596
597 · SomePackage-1.0 requires AnotherPackage>=1.0
598
599 · SomePackage-2.0 requires AnotherPackage>=1.0 and OneMorePackage==1.0
600
601 · SomePackage-1.0 and AnotherPackage-1.0 are currently installed
602
603 · SomePackage-2.0 and AnotherPackage-2.0 are the latest versions avail‐
604 able on PyPI.
605
606 Running pip install --upgrade SomePackage would upgrade SomePackage and
607 AnotherPackage despite AnotherPackage already being satisfied.
608
609 pip doesn’t currently have an option to do an “only if needed” recur‐
610 sive upgrade, but you can achieve it using these 2 steps:
611
612 pip install --upgrade --no-deps SomePackage
613 pip install SomePackage
614
615 The first line will upgrade SomePackage, but not dependencies like
616 AnotherPackage. The 2nd line will fill in new dependencies like
617 OneMorePackage.
618
619 See #59 for a plan of making “only if needed” recursive the default
620 behavior for a new pip upgrade command.
621
622 User Installs
623 With Python 2.6 came the “user scheme” for installation, which means
624 that all Python distributions support an alternative install location
625 that is specific to a user. The default location for each OS is
626 explained in the python documentation for the site.USER_BASE variable.
627 This mode of installation can be turned on by specifying the –user
628 option to pip install.
629
630 Moreover, the “user scheme” can be customized by setting the
631 PYTHONUSERBASE environment variable, which updates the value of
632 site.USER_BASE.
633
634 To install “SomePackage” into an environment with site.USER_BASE cus‐
635 tomized to ‘/myappenv’, do the following:
636
637 export PYTHONUSERBASE=/myappenv
638 pip install --user SomePackage
639
640 pip install --user follows four rules:
641
642 1. When globally installed packages are on the python path, and they
643 conflict with the installation requirements, they are ignored, and
644 not uninstalled.
645
646 2. When globally installed packages are on the python path, and they
647 satisfy the installation requirements, pip does nothing, and reports
648 that requirement is satisfied (similar to how global packages can
649 satisfy requirements when installing packages in a --sys‐
650 tem-site-packages virtualenv).
651
652 3. pip will not perform a --user install in a --no-site-packages vir‐
653 tualenv (i.e. the default kind of virtualenv), due to the user site
654 not being on the python path. The installation would be pointless.
655
656 4. In a --system-site-packages virtualenv, pip will not install a pack‐
657 age that conflicts with a package in the virtualenv site-packages.
658 The –user installation would lack sys.path precedence and be point‐
659 less.
660
661 To make the rules clearer, here are some examples:
662
663 From within a --no-site-packages virtualenv (i.e. the default kind):
664
665 $ pip install --user SomePackage
666 Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
667
668 From within a --system-site-packages virtualenv where SomePackage==0.3
669 is already installed in the virtualenv:
670
671 $ pip install --user SomePackage==0.4
672 Will not install to the user site because it will lack sys.path precedence
673
674 From within a real python, where SomePackage is not installed globally:
675
676 $ pip install --user SomePackage
677 [...]
678 Successfully installed SomePackage
679
680 From within a real python, where SomePackage is installed globally, but
681 is not the latest version:
682
683 $ pip install --user SomePackage
684 [...]
685 Requirement already satisfied (use --upgrade to upgrade)
686
687 $ pip install --user --upgrade SomePackage
688 [...]
689 Successfully installed SomePackage
690
691 From within a real python, where SomePackage is installed globally, and
692 is the latest version:
693
694 $ pip install --user SomePackage
695 [...]
696 Requirement already satisfied (use --upgrade to upgrade)
697
698 $ pip install --user --upgrade SomePackage
699 [...]
700 Requirement already up-to-date: SomePackage
701
702 # force the install
703 $ pip install --user --ignore-installed SomePackage
704 [...]
705 Successfully installed SomePackage
706
707 Ensuring Repeatability
708 pip can achieve various levels of repeatability:
709
710 Pinned Version Numbers
711 Pinning the versions of your dependencies in the requirements file pro‐
712 tects you from bugs or incompatibilities in newly released versions:
713
714 SomePackage == 1.2.3
715 DependencyOfSomePackage == 4.5.6
716
717 Using pip freeze to generate the requirements file will ensure that not
718 only the top-level dependencies are included but their sub-dependencies
719 as well, and so on. Perform the installation using –no-deps for an
720 extra dose of insurance against installing anything not explicitly
721 listed.
722
723 This strategy is easy to implement and works across OSes and architec‐
724 tures. However, it trusts PyPI and the certificate authority chain. It
725 also relies on indices and find-links locations not allowing packages
726 to change without a version increase. (PyPI does protect against this.)
727
728 Hash-checking Mode
729 Beyond pinning version numbers, you can add hashes against which to
730 verify downloaded packages:
731
732 FooProject == 1.2 --hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
733
734 This protects against a compromise of PyPI or the HTTPS certificate
735 chain. It also guards against a package changing without its version
736 number changing (on indexes that allow this). This approach is a good
737 fit for automated server deployments.
738
739 Hash-checking mode is a labor-saving alternative to running a private
740 index server containing approved packages: it removes the need to
741 upload packages, maintain ACLs, and keep an audit trail (which a VCS
742 gives you on the requirements file for free). It can also substitute
743 for a vendor library, providing easier upgrades and less VCS noise. It
744 does not, of course, provide the availability benefits of a private
745 index or a vendor library.
746
747 For more, see pip install’s discussion of hash-checking mode.
748
749 Installation Bundles
750 Using pip wheel, you can bundle up all of a project’s dependencies,
751 with any compilation done, into a single archive. This allows installa‐
752 tion when index servers are unavailable and avoids time-consuming
753 recompilation. Create an archive like this:
754
755 $ tempdir=$(mktemp -d /tmp/wheelhouse-XXXXX)
756 $ pip wheel -r requirements.txt --wheel-dir=$tempdir
757 $ cwd=`pwd`
758 $ (cd "$tempdir"; tar -cjvf "$cwd/bundled.tar.bz2" *)
759
760 You can then install from the archive like this:
761
762 $ tempdir=$(mktemp -d /tmp/wheelhouse-XXXXX)
763 $ (cd $tempdir; tar -xvf /path/to/bundled.tar.bz2)
764 $ pip install --force-reinstall --ignore-installed --upgrade --no-index --no-deps $tempdir/*
765
766 Note that compiled packages are typically OS- and architecture-spe‐
767 cific, so these archives are not necessarily portable across machines.
768
769 Hash-checking mode can be used along with this method to ensure that
770 future archives are built with identical packages.
771
772 WARNING:
773 Finally, beware of the setup_requires keyword arg in setup.py. The
774 (rare) packages that use it will cause those dependencies to be
775 downloaded by setuptools directly, skipping pip’s protections. If
776 you need to use such a package, see Controlling setup_requires.
777
779 pip
780 Contents
781 · pip
782
783 · Usage
784
785 · Description
786
787 · Logging
788
789 · Console logging
790
791 · File logging
792
793 · –exists-action option
794
795 · Build System Interface
796
797 · Setuptools Injection
798
799 · Future Developments
800
801 · Build Options
802
803 · General Options
804
805 Usage
806 pip <command> [options]
807
808 Description
809 Logging
810 Console logging
811 pip offers -v, –verbose and -q, –quiet to control the console log
812 level.
813
814 File logging
815 pip offers the –log option for specifying a file where a maximum ver‐
816 bosity log will be kept. This option is empty by default. This log
817 appends to previous logging.
818
819 Like all pip options, --log can also be set as an environment variable,
820 or placed into the pip config file. See the Configuration section.
821
822 –exists-action option
823 This option specifies default behavior when path already exists. Pos‐
824 sible cases: downloading files or checking out repositories for instal‐
825 lation, creating archives. If --exists-action is not defined, pip will
826 prompt when decision is needed.
827
828 (s)witch
829 Only relevant to VCS checkout. Attempt to switch the checkout to
830 the appropriate url and/or revision.
831
832 (i)gnore
833 Abort current operation (e.g. don’t copy file, don’t create ar‐
834 chive, don’t modify a checkout).
835
836 (w)ipe Delete the file or VCS checkout before trying to create, down‐
837 load, or checkout a new one.
838
839 (b)ackup
840 Rename the file or checkout to {name}{'.bak' * n}, where n is
841 some number of .bak extensions, such that the file didn’t exist
842 at some point. So the most recent backup will be the one with
843 the largest number after .bak.
844
845 (a)abort
846 Abort pip and return non-zero exit status.
847
848 Build System Interface
849 Pip builds packages by invoking the build system. Presently, the only
850 supported build system is setuptools, but future developments to the
851 Python packaging infrastructure are expected to include support for
852 other build systems. As well as package building, the build system is
853 also invoked to install packages direct from source.
854
855 The interface to the build system is via the setup.py command line
856 script - all build actions are defined in terms of the specific set‐
857 up.py command line that will be run to invoke the required action.
858
859 Setuptools Injection
860 As noted above, the supported build system is setuptools. However, not
861 all packages use setuptools in their build scripts. To support projects
862 that use “pure distutils”, pip injects setuptools into sys.modules
863 before invoking setup.py. The injection should be transparent to distu‐
864 tils-based projects, but 3rd party build tools wishing to provide a
865 setup.py emulating the commands pip requires may need to be aware that
866 it takes place.
867
868 Future Developments
869 PEP426 notes that the intention is to add hooks to project metadata in
870 version 2.1 of the metadata spec, to explicitly define how to build a
871 project from its source. Once this version of the metadata spec is
872 final, pip will migrate to using that interface. At that point, the
873 setup.py interface documented here will be retained solely for legacy
874 purposes, until projects have migrated.
875
876 Specifically, applications should not expect to rely on there being any
877 form of backward compatibility guarantees around the setup.py inter‐
878 face.
879
880 Build Options
881 The --global-option and --build-option arguments to the pip install and
882 pip wheel inject additional arguments into the setup.py command
883 (--build-option is only available in pip wheel). These arguments are
884 included in the command as follows:
885
886 python setup.py <global_options> BUILD COMMAND <build_options>
887
888 The options are passed unmodified, and presently offer direct access to
889 the distutils command line. Use of --global-option and --build-option
890 should be considered as build system dependent, and may not be sup‐
891 ported in the current form if support for alternative build systems is
892 added to pip.
893
894 General Options
895 -h, --help
896 Show help.
897
898 --isolated
899 Run pip in an isolated mode, ignoring environment variables and
900 user configuration.
901
902 -v, --verbose
903 Give more output. Option is additive, and can be used up to 3
904 times.
905
906 -V, --version
907 Show version and exit.
908
909 -q, --quiet
910 Give less output. Option is additive, and can be used up to 3
911 times (corresponding to WARNING, ERROR, and CRITICAL logging
912 levels).
913
914 --log <path>
915 Path to a verbose appending log.
916
917 --proxy <proxy>
918 Specify a proxy in the form [user:passwd@]proxy.server:port.
919
920 --retries <retries>
921 Maximum number of retries each connection should attempt
922 (default 5 times).
923
924 --timeout <sec>
925 Set the socket timeout (default 15 seconds).
926
927 --exists-action <action>
928 Default action when a path already exists: (s)witch, (i)gnore,
929 (w)ipe, (b)ackup, (a)bort.
930
931 --trusted-host <hostname>
932 Mark this host as trusted, even though it does not have valid or
933 any HTTPS.
934
935 --cert <path>
936 Path to alternate CA bundle.
937
938 --client-cert <path>
939 Path to SSL client certificate, a single file containing the
940 private key and the certificate in PEM format.
941
942 --cache-dir <dir>
943 Store the cache data in <dir>.
944
945 --no-cache-dir
946 Disable the cache.
947
948 --disable-pip-version-check
949 Don’t periodically check PyPI to determine whether a new version
950 of pip is available for download. Implied with –no-index.
951
952
953 pip install
954 Contents
955 · pip install
956
957 · Usage
958
959 · Description
960
961 · Overview
962
963 · Argument Handling
964
965 · Working Out the Name and Version
966
967 · Satisfying Requirements
968
969 · Installation Order
970
971 · Requirements File Format
972
973 · Example Requirements File
974
975 · Requirement Specifiers
976
977 · Per-requirement Overrides
978
979 · Pre-release Versions
980
981 · VCS Support
982
983 · Git
984
985 · Mercurial
986
987 · Subversion
988
989 · Bazaar
990
991 · Finding Packages
992
993 · SSL Certificate Verification
994
995 · Caching
996
997 · Wheel Cache
998
999 · Hash-Checking Mode
1000
1001 · Hashes from PyPI
1002
1003 · “Editable” Installs
1004
1005 · Controlling setup_requires
1006
1007 · Build System Interface
1008
1009 · Options
1010
1011 · Examples
1012
1013 Usage
1014 pip install [options] <requirement specifier> [package-index-options] ...
1015 pip install [options] -r <requirements file> [package-index-options] ...
1016 pip install [options] [-e] <vcs project url> ...
1017 pip install [options] [-e] <local project path> ...
1018 pip install [options] <archive url/path> ...
1019
1020 Description
1021 Install packages from:
1022
1023 · PyPI (and other indexes) using requirement specifiers.
1024
1025 · VCS project urls.
1026
1027 · Local project directories.
1028
1029 · Local or remote source archives.
1030
1031 pip also supports installing from “requirements files”, which provide
1032 an easy way to specify a whole environment to be installed.
1033
1034
1035 Overview
1036 Pip install has several stages:
1037
1038 1. Identify the base requirements. The user supplied arguments are pro‐
1039 cessed here.
1040
1041 2. Resolve dependencies. What will be installed is determined here.
1042
1043 3. Build wheels. All the dependencies that can be are built into
1044 wheels.
1045
1046 4. Install the packages (and uninstall anything being
1047 upgraded/replaced).
1048
1049 Argument Handling
1050 When looking at the items to be installed, pip checks what type of item
1051 each is, in the following order:
1052
1053 1. Project or archive URL.
1054
1055 2. Local directory (which must contain a setup.py, or pip will report
1056 an error).
1057
1058 3. Local file (a sdist or wheel format archive, following the naming
1059 conventions for those formats).
1060
1061 4. A requirement, as specified in PEP 440.
1062
1063 Each item identified is added to the set of requirements to be satis‐
1064 fied by the install.
1065
1066 Working Out the Name and Version
1067 For each candidate item, pip needs to know the project name and ver‐
1068 sion. For wheels (identified by the .whl file extension) this can be
1069 obtained from the filename, as per the Wheel spec. For local directo‐
1070 ries, or explicitly specified sdist files, the setup.py egg_info com‐
1071 mand is used to determine the project metadata. For sdists located via
1072 an index, the filename is parsed for the name and project version (this
1073 is in theory slightly less reliable than using the egg_info command,
1074 but avoids downloading and processing unnecessary numbers of files).
1075
1076 Any URL may use the #egg=name syntax (see VCS Support) to explicitly
1077 state the project name.
1078
1079 Satisfying Requirements
1080 Once pip has the set of requirements to satisfy, it chooses which ver‐
1081 sion of each requirement to install using the simple rule that the lat‐
1082 est version that satisfies the given constraints will be installed (but
1083 see here for an exception regarding pre-release versions). Where more
1084 than one source of the chosen version is available, it is assumed that
1085 any source is acceptable (as otherwise the versions would differ).
1086
1087 Installation Order
1088 As of v6.1.0, pip installs dependencies before their dependents, i.e.
1089 in “topological order”. This is the only commitment pip currently
1090 makes related to order. While it may be coincidentally true that pip
1091 will install things in the order of the install arguments or in the
1092 order of the items in a requirements file, this is not a promise.
1093
1094 In the event of a dependency cycle (aka “circular dependency”), the
1095 current implementation (which might possibly change later) has it such
1096 that the first encountered member of the cycle is installed last.
1097
1098 For instance, if quux depends on foo which depends on bar which depends
1099 on baz, which depends on foo:
1100
1101 pip install quux
1102 ...
1103 Installing collected packages baz, bar, foo, quux
1104
1105 pip install bar
1106 ...
1107 Installing collected packages foo, baz, bar
1108
1109 Prior to v6.1.0, pip made no commitments about install order.
1110
1111 The decision to install topologically is based on the principle that
1112 installations should proceed in a way that leaves the environment
1113 usable at each step. This has two main practical benefits:
1114
1115 1. Concurrent use of the environment during the install is more likely
1116 to work.
1117
1118 2. A failed install is less likely to leave a broken environment.
1119 Although pip would like to support failure rollbacks eventually, in
1120 the mean time, this is an improvement.
1121
1122 Although the new install order is not intended to replace (and does not
1123 replace) the use of setup_requires to declare build dependencies, it
1124 may help certain projects install from sdist (that might previously
1125 fail) that fit the following profile:
1126
1127 1. They have build dependencies that are also declared as install
1128 dependencies using install_requires.
1129
1130 2. python setup.py egg_info works without their build dependencies
1131 being installed.
1132
1133 3. For whatever reason, they don’t or won’t declare their build depen‐
1134 dencies using setup_requires.
1135
1136 Requirements File Format
1137 Each line of the requirements file indicates something to be installed,
1138 and like arguments to pip install, the following forms are supported:
1139
1140 [[--option]...]
1141 <requirement specifier> [; markers] [[--option]...]
1142 <archive url/path>
1143 [-e] <local project path>
1144 [-e] <vcs project url>
1145
1146 For details on requirement specifiers, see Requirement Specifiers.
1147
1148 See the pip install Examples for examples of all these forms.
1149
1150 A line that begins with # is treated as a comment and ignored. White‐
1151 space followed by a # causes the # and the remainder of the line to be
1152 treated as a comment.
1153
1154 A line ending in an unescaped \ is treated as a line continuation and
1155 the newline following it is effectively ignored.
1156
1157 Comments are stripped before line continuations are processed.
1158
1159 The following options are supported:
1160
1161 · -i, –index-url
1162
1163 · –extra-index-url
1164
1165 · –no-index
1166
1167 · -f, –find-links
1168
1169 · –no-binary
1170
1171 · –only-binary
1172
1173 · –require-hashes
1174
1175 For example, to specify –no-index and 2 –find-links locations:
1176
1177 --no-index
1178 --find-links /my/local/archives
1179 --find-links http://some.archives.com/archives
1180
1181 If you wish, you can refer to other requirements files, like this:
1182
1183 -r more_requirements.txt
1184
1185 You can also refer to constraints files, like this:
1186
1187 -c some_constraints.txt
1188
1189 Example Requirements File
1190 Use pip install -r example-requirements.txt to install:
1191
1192 #
1193 ####### example-requirements.txt #######
1194 #
1195 ###### Requirements without Version Specifiers ######
1196 nose
1197 nose-cov
1198 beautifulsoup4
1199 #
1200 ###### Requirements with Version Specifiers ######
1201 # See https://www.python.org/dev/peps/pep-0440/#version-specifiers
1202 docopt == 0.6.1 # Version Matching. Must be version 0.6.1
1203 keyring >= 4.1.1 # Minimum version 4.1.1
1204 coverage != 3.5 # Version Exclusion. Anything except version 3.5
1205 Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.*
1206 #
1207 ###### Refer to other requirements files ######
1208 -r other-requirements.txt
1209 #
1210 #
1211 ###### A particular file ######
1212 ./downloads/numpy-1.9.2-cp34-none-win32.whl
1213 http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev1820+49a8884-cp34-none-win_amd64.whl
1214 #
1215 ###### Additional Requirements without Version Specifiers ######
1216 # Same as 1st section, just here to show that you can put things in any order.
1217 rejected
1218 green
1219 #
1220
1221 Requirement Specifiers
1222 pip supports installing from a package index using a requirement speci‐
1223 fier. Generally speaking, a requirement specifier is composed of a
1224 project name followed by optional version specifiers. PEP508 contains
1225 a full specification of the format of a requirement (pip does not sup‐
1226 port the url_req form of specifier at this time).
1227
1228 Some examples:
1229
1230 SomeProject
1231 SomeProject == 1.3
1232 SomeProject >=1.2,<.2.0
1233 SomeProject[foo, bar]
1234 SomeProject~=1.4.2
1235
1236 Since version 6.0, pip also supports specifiers containing environment
1237 markers like so:
1238
1239 SomeProject ==5.4 ; python_version < '2.7'
1240 SomeProject; sys_platform == 'win32'
1241
1242 Environment markers are supported in the command line and in require‐
1243 ments files.
1244
1245 NOTE:
1246 Use quotes around specifiers in the shell when using >, <, or when
1247 using environment markers. Don’t use quotes in requirement files.
1248 [1]
1249
1250 Per-requirement Overrides
1251 Since version 7.0 pip supports controlling the command line options
1252 given to setup.py via requirements files. This disables the use of
1253 wheels (cached or otherwise) for that package, as setup.py does not
1254 exist for wheels.
1255
1256 The --global-option and --install-option options are used to pass
1257 options to setup.py. For example:
1258
1259 FooProject >= 1.2 --global-option="--no-user-cfg" \
1260 --install-option="--prefix='/usr/local'" \
1261 --install-option="--no-compile"
1262
1263 The above translates roughly into running FooProject’s setup.py script
1264 as:
1265
1266 python setup.py --no-user-cfg install --prefix='/usr/local' --no-compile
1267
1268 Note that the only way of giving more than one option to setup.py is
1269 through multiple --global-option and --install-option options, as shown
1270 in the example above. The value of each option is passed as a single
1271 argument to the setup.py script. Therefore, a line such as the follow‐
1272 ing is invalid and would result in an installation error.
1273
1274 # Invalid. Please use '--install-option' twice as shown above.
1275 FooProject >= 1.2 --install-option="--prefix=/usr/local --no-compile"
1276
1277 Pre-release Versions
1278 Starting with v1.4, pip will only install stable versions as specified
1279 by PEP426 by default. If a version cannot be parsed as a compliant
1280 PEP426 version then it is assumed to be a pre-release.
1281
1282 If a Requirement specifier includes a pre-release or development ver‐
1283 sion (e.g. >=0.0.dev0) then pip will allow pre-release and development
1284 versions for that requirement. This does not include the != flag.
1285
1286 The pip install command also supports a –pre flag that will enable
1287 installing pre-releases and development releases.
1288
1289 VCS Support
1290 pip supports installing from Git, Mercurial, Subversion and Bazaar, and
1291 detects the type of VCS using url prefixes: “git+”, “hg+”, “bzr+”,
1292 “svn+”.
1293
1294 pip requires a working VCS command on your path: git, hg, svn, or bzr.
1295
1296 VCS projects can be installed in editable mode (using the –editable
1297 option) or not.
1298
1299 · For editable installs, the clone location by default is “<venv
1300 path>/src/SomeProject” in virtual environments, and “<cwd>/src/Some‐
1301 Project” for global installs. The –src option can be used to modify
1302 this location.
1303
1304 · For non-editable installs, the project is built locally in a temp dir
1305 and then installed normally. Note that if a satisfactory version of
1306 the package is already installed, the VCS source will not overwrite
1307 it without an –upgrade flag. VCS requirements pin the package version
1308 (specified in the setup.py file) of the target commit, not necessar‐
1309 ily the commit itself.
1310
1311 The “project name” component of the url suffix “egg=<project
1312 name>-<version>” is used by pip in its dependency logic to identify the
1313 project prior to pip downloading and analyzing the metadata. The
1314 optional “version” component of the egg name is not functionally impor‐
1315 tant. It merely provides a human-readable clue as to what version is
1316 in use. For projects where setup.py is not in the root of project,
1317 “subdirectory” component is used. Value of “subdirectory” component
1318 should be a path starting from root of the project to where setup.py is
1319 located.
1320
1321 So if your repository layout is:
1322
1323 · pkg_dir/
1324
1325 · setup.py # setup.py for package pkg
1326
1327 · some_module.py
1328
1329 · other_dir/
1330
1331 · some_file
1332
1333 · some_other_file
1334
1335 You’ll need to use pip install -e vcs+protocol://repo_url/#egg=pkg&sub‐
1336 directory=pkg_dir.
1337
1338 Git
1339 pip currently supports cloning over git, git+http, git+https, git+ssh,
1340 git+git and git+file:
1341
1342 Here are the supported forms:
1343
1344 [-e] git://git.myproject.org/MyProject#egg=MyProject
1345 [-e] git+http://git.myproject.org/MyProject#egg=MyProject
1346 [-e] git+https://git.myproject.org/MyProject#egg=MyProject
1347 [-e] git+ssh://git.myproject.org/MyProject#egg=MyProject
1348 [-e] git+git://git.myproject.org/MyProject#egg=MyProject
1349 [-e] git+file://git.myproject.org/MyProject#egg=MyProject
1350 -e git+git@git.myproject.org:MyProject#egg=MyProject
1351
1352 Passing branch names, a commit hash or a tag name is possible like so:
1353
1354 [-e] git://git.myproject.org/MyProject.git@master#egg=MyProject
1355 [-e] git://git.myproject.org/MyProject.git@v1.0#egg=MyProject
1356 [-e] git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject
1357
1358 Mercurial
1359 The supported schemes are: hg+http, hg+https, hg+static-http and
1360 hg+ssh.
1361
1362 Here are the supported forms:
1363
1364 [-e] hg+http://hg.myproject.org/MyProject#egg=MyProject
1365 [-e] hg+https://hg.myproject.org/MyProject#egg=MyProject
1366 [-e] hg+ssh://hg.myproject.org/MyProject#egg=MyProject
1367
1368 You can also specify a revision number, a revision hash, a tag name or
1369 a local branch name like so:
1370
1371 [-e] hg+http://hg.myproject.org/MyProject@da39a3ee5e6b#egg=MyProject
1372 [-e] hg+http://hg.myproject.org/MyProject@2019#egg=MyProject
1373 [-e] hg+http://hg.myproject.org/MyProject@v1.0#egg=MyProject
1374 [-e] hg+http://hg.myproject.org/MyProject@special_feature#egg=MyProject
1375
1376 Subversion
1377 pip supports the URL schemes svn, svn+svn, svn+http, svn+https,
1378 svn+ssh.
1379
1380 You can also give specific revisions to an SVN URL, like so:
1381
1382 [-e] svn+svn://svn.myproject.org/svn/MyProject#egg=MyProject
1383 [-e] svn+http://svn.myproject.org/svn/MyProject/trunk@2019#egg=MyProject
1384
1385 which will check out revision 2019. @{20080101} would also check out
1386 the revision from 2008-01-01. You can only check out specific revisions
1387 using -e svn+....
1388
1389 Bazaar
1390 pip supports Bazaar using the bzr+http, bzr+https, bzr+ssh, bzr+sftp,
1391 bzr+ftp and bzr+lp schemes.
1392
1393 Here are the supported forms:
1394
1395 [-e] bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject
1396 [-e] bzr+sftp://user@myproject.org/MyProject/trunk#egg=MyProject
1397 [-e] bzr+ssh://user@myproject.org/MyProject/trunk#egg=MyProject
1398 [-e] bzr+ftp://user@myproject.org/MyProject/trunk#egg=MyProject
1399 [-e] bzr+lp:MyProject#egg=MyProject
1400
1401 Tags or revisions can be installed like so:
1402
1403 [-e] bzr+https://bzr.myproject.org/MyProject/trunk@2019#egg=MyProject
1404 [-e] bzr+http://bzr.myproject.org/MyProject/trunk@v1.0#egg=MyProject
1405
1406 Finding Packages
1407 pip searches for packages on PyPI using the http simple interface,
1408 which is documented here and there
1409
1410 pip offers a number of Package Index Options for modifying how packages
1411 are found.
1412
1413 pip looks for packages in a number of places, on PyPI (if not disabled
1414 via `--no-index`), in the local filesystem, and in any additional
1415 repositories specified via `--find-links` or `--index-url`. There is no
1416 ordering in the locations that are searched, rather they are all
1417 checked, and the “best” match for the requirements (in terms of version
1418 number - see PEP440 for details) is selected.
1419
1420 See the pip install Examples.
1421
1422 SSL Certificate Verification
1423 Starting with v1.3, pip provides SSL certificate verification over
1424 https, to prevent man-in-the-middle attacks against PyPI downloads.
1425
1426 Caching
1427 Starting with v6.0, pip provides an on-by-default cache which functions
1428 similarly to that of a web browser. While the cache is on by default
1429 and is designed do the right thing by default you can disable the cache
1430 and always access PyPI by utilizing the --no-cache-dir option.
1431
1432 When making any HTTP request pip will first check its local cache to
1433 determine if it has a suitable response stored for that request which
1434 has not expired. If it does then it simply returns that response and
1435 doesn’t make the request.
1436
1437 If it has a response stored, but it has expired, then it will attempt
1438 to make a conditional request to refresh the cache which will either
1439 return an empty response telling pip to simply use the cached item (and
1440 refresh the expiration timer) or it will return a whole new response
1441 which pip can then store in the cache.
1442
1443 When storing items in the cache, pip will respect the CacheControl
1444 header if it exists, or it will fall back to the Expires header if that
1445 exists. This allows pip to function as a browser would, and allows the
1446 index server to communicate to pip how long it is reasonable to cache
1447 any particular item.
1448
1449 While this cache attempts to minimize network activity, it does not
1450 prevent network access altogether. If you want a local install solution
1451 that circumvents accessing PyPI, see Installing from local packages.
1452
1453 The default location for the cache directory depends on the Operating
1454 System:
1455
1456 Unix ~/.cache/pip and it respects the XDG_CACHE_HOME directory.
1457
1458 macOS ~/Library/Caches/pip.
1459
1460 Windows
1461 <CSIDL_LOCAL_APPDATA>\pip\Cache
1462
1463 Wheel Cache
1464 Pip will read from the subdirectory wheels within the pip cache direc‐
1465 tory and use any packages found there. This is disabled via the same
1466 --no-cache-dir option that disables the HTTP cache. The internal struc‐
1467 ture of that is not part of the pip API. As of 7.0, pip makes a subdi‐
1468 rectory for each sdist that wheels are built from and places the
1469 resulting wheels inside.
1470
1471 Pip attempts to choose the best wheels from those built in preference
1472 to building a new wheel. Note that this means when a package has both
1473 optional C extensions and builds py tagged wheels when the C extension
1474 can’t be built that pip will not attempt to build a better wheel for
1475 Pythons that would have supported it, once any generic wheel is built.
1476 To correct this, make sure that the wheels are built with Python spe‐
1477 cific tags - e.g. pp on Pypy.
1478
1479 When no wheels are found for an sdist, pip will attempt to build a
1480 wheel automatically and insert it into the wheel cache.
1481
1482 Hash-Checking Mode
1483 Since version 8.0, pip can check downloaded package archives against
1484 local hashes to protect against remote tampering. To verify a package
1485 against one or more hashes, add them to the end of the line:
1486
1487 FooProject == 1.2 --hash=sha256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 \
1488 --hash=sha256:486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7
1489
1490 (The ability to use multiple hashes is important when a package has
1491 both binary and source distributions or when it offers binary distribu‐
1492 tions for a variety of platforms.)
1493
1494 The recommended hash algorithm at the moment is sha256, but stronger
1495 ones are allowed, including all those supported by hashlib. However,
1496 weaker ones such as md5, sha1, and sha224 are excluded to avoid giving
1497 a false sense of security.
1498
1499 Hash verification is an all-or-nothing proposition. Specifying a --hash
1500 against any requirement not only checks that hash but also activates a
1501 global hash-checking mode, which imposes several other security
1502 restrictions:
1503
1504 · Hashes are required for all requirements. This is because a par‐
1505 tially-hashed requirements file is of little use and thus likely an
1506 error: a malicious actor could slip bad code into the installation
1507 via one of the unhashed requirements. Note that hashes embedded in
1508 URL-style requirements via the #md5=... syntax suffice to satisfy
1509 this rule (regardless of hash strength, for legacy reasons), though
1510 you should use a stronger hash like sha256 whenever possible.
1511
1512 · Hashes are required for all dependencies. An error results if there
1513 is a dependency that is not spelled out and hashed in the require‐
1514 ments file.
1515
1516 · Requirements that take the form of project names (rather than URLs or
1517 local filesystem paths) must be pinned to a specific version using
1518 ==. This prevents a surprising hash mismatch upon the release of a
1519 new version that matches the requirement specifier.
1520
1521 · --egg is disallowed, because it delegates installation of dependen‐
1522 cies to setuptools, giving up pip’s ability to enforce any of the
1523 above.
1524
1525 Hash-checking mode can be forced on with the --require-hashes com‐
1526 mand-line option:
1527
1528 $ pip install --require-hashes -r requirements.txt
1529 ...
1530 Hashes are required in --require-hashes mode (implicitly on when a hash is
1531 specified for any package). These requirements were missing hashes,
1532 leaving them open to tampering. These are the hashes the downloaded
1533 archives actually had. You can add lines like these to your requirements
1534 files to prevent tampering.
1535 pyelasticsearch==1.0 --hash=sha256:44ddfb1225054d7d6b1d02e9338e7d4809be94edbe9929a2ec0807d38df993fa
1536 more-itertools==2.2 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
1537
1538 This can be useful in deploy scripts, to ensure that the author of the
1539 requirements file provided hashes. It is also a convenient way to boot‐
1540 strap your list of hashes, since it shows the hashes of the packages it
1541 fetched. It fetches only the preferred archive for each package, so you
1542 may still need to add hashes for alternatives archives using pip hash:
1543 for instance if there is both a binary and a source distribution.
1544
1545 The wheel cache is disabled in hash-checking mode to prevent spurious
1546 hash mismatch errors. These would otherwise occur while installing
1547 sdists that had already been automatically built into cached wheels:
1548 those wheels would be selected for installation, but their hashes would
1549 not match the sdist ones from the requirements file. A further compli‐
1550 cation is that locally built wheels are nondeterministic: contemporary
1551 modification times make their way into the archive, making hashes
1552 unpredictable across machines and cache flushes. Compilation of C code
1553 adds further nondeterminism, as many compilers include random-seeded
1554 values in their output. However, wheels fetched from index servers are
1555 the same every time. They land in pip’s HTTP cache, not its wheel
1556 cache, and are used normally in hash-checking mode. The only downside
1557 of having the wheel cache disabled is thus extra build time for sdists,
1558 and this can be solved by making sure pre-built wheels are available
1559 from the index server.
1560
1561 Hash-checking mode also works with pip download and pip wheel. A com‐
1562 parison of hash-checking mode with other repeatability strategies is
1563 available in the User Guide.
1564
1565 WARNING:
1566 Beware of the setup_requires keyword arg in setup.py. The (rare)
1567 packages that use it will cause those dependencies to be downloaded
1568 by setuptools directly, skipping pip’s hash-checking. If you need to
1569 use such a package, see Controlling setup_requires.
1570
1571 WARNING:
1572 Be careful not to nullify all your security work when you install
1573 your actual project by using setuptools directly: for example, by
1574 calling python setup.py install, python setup.py develop, or
1575 easy_install. Setuptools will happily go out and download,
1576 unchecked, anything you missed in your requirements file—and it’s
1577 easy to miss things as your project evolves. To be safe, install
1578 your project using pip and –no-deps.
1579
1580 Instead of python setup.py develop, use…
1581
1582 pip install --no-deps -e .
1583
1584 Instead of python setup.py install, use…
1585
1586 pip install --no-deps .
1587
1588 Hashes from PyPI
1589 PyPI provides an MD5 hash in the fragment portion of each package down‐
1590 load URL, like #md5=123..., which pip checks as a protection against
1591 download corruption. Other hash algorithms that have guaranteed support
1592 from hashlib are also supported here: sha1, sha224, sha384, sha256, and
1593 sha512. Since this hash originates remotely, it is not a useful guard
1594 against tampering and thus does not satisfy the --require-hashes demand
1595 that every package have a local hash.
1596
1597 “Editable” Installs
1598 “Editable” installs are fundamentally “setuptools develop mode”
1599 installs.
1600
1601 You can install local projects or VCS projects in “editable” mode:
1602
1603 $ pip install -e path/to/SomeProject
1604 $ pip install -e git+http://repo/my_project.git#egg=SomeProject
1605
1606 (See the VCS Support section above for more information on VCS-related
1607 syntax.)
1608
1609 For local projects, the “SomeProject.egg-info” directory is created
1610 relative to the project path. This is one advantage over just using
1611 setup.py develop, which creates the “egg-info” directly relative the
1612 current working directory.
1613
1614 Controlling setup_requires
1615 Setuptools offers the setup_requires setup() keyword for specifying
1616 dependencies that need to be present in order for the setup.py script
1617 to run. Internally, Setuptools uses easy_install to fulfill these
1618 dependencies.
1619
1620 pip has no way to control how these dependencies are located. None of
1621 the Package Index Options have an effect.
1622
1623 The solution is to configure a “system” or “personal” Distutils config‐
1624 uration file to manage the fulfillment.
1625
1626 For example, to have the dependency located at an alternate index, add
1627 this:
1628
1629 [easy_install]
1630 index_url = https://my.index-mirror.com
1631
1632 To have the dependency located from a local directory and not crawl
1633 PyPI, add this:
1634
1635 [easy_install]
1636 allow_hosts = ''
1637 find_links = file:///path/to/local/archives/
1638
1639 Build System Interface
1640 In order for pip to install a package from source, setup.py must imple‐
1641 ment the following commands:
1642
1643 setup.py egg_info [--egg-base XXX]
1644 setup.py install --record XXX [--single-version-externally-managed] [--root XXX] [--compile|--no-compile] [--install-headers XXX]
1645
1646 The egg_info command should create egg metadata for the package, as
1647 described in the setuptools documentation at
1648 https://setuptools.readthedocs.io/en/latest/setuptools.html#egg-info-create-egg-metadata-and-set-build-tags
1649
1650 The install command should implement the complete process of installing
1651 the package to the target directory XXX.
1652
1653 To install a package in “editable” mode (pip install -e), setup.py must
1654 implement the following command:
1655
1656 setup.py develop --no-deps
1657
1658 This should implement the complete process of installing the package in
1659 “editable” mode.
1660
1661 All packages will be attempted to built into wheels:
1662
1663 setup.py bdist_wheel -d XXX
1664
1665 One further setup.py command is invoked by pip install:
1666
1667 setup.py clean
1668
1669 This command is invoked to clean up temporary commands from the build.
1670 (TODO: Investigate in more detail when this command is required).
1671
1672 No other build system commands are invoked by the pip install command.
1673
1674 Installing a package from a wheel does not invoke the build system at
1675 all.
1676
1677 Options
1678 -c, --constraint <file>
1679 Constrain versions using the given constraints file. This option
1680 can be used multiple times.
1681
1682 -e, --editable <path/url>
1683 Install a project in editable mode (i.e. setuptools “develop
1684 mode”) from a local project path or a VCS url.
1685
1686 -r, --requirement <file>
1687 Install from the given requirements file. This option can be
1688 used multiple times.
1689
1690 -b, --build <dir>
1691 Directory to unpack packages into and build in.
1692
1693 -t, --target <dir>
1694 Install packages into <dir>. By default this will not replace
1695 existing files/folders in <dir>. Use –upgrade to replace exist‐
1696 ing packages in <dir> with new versions.
1697
1698 -d, --download <dir>
1699 Download packages into <dir> instead of installing them, regard‐
1700 less of what’s already installed.
1701
1702 --src <dir>
1703 Directory to check out editable projects into. The default in a
1704 virtualenv is “<venv path>/src”. The default for global installs
1705 is “<current dir>/src”.
1706
1707 -U, --upgrade
1708 Upgrade all specified packages to the newest available version.
1709 The handling of dependencies depends on the upgrade-strategy
1710 used.
1711
1712 --upgrade-strategy <upgrade_strategy>
1713 Determines how dependency upgrading should be handled. “eager” -
1714 dependencies are upgraded regardless of whether the currently
1715 installed version satisfies the requirements of the upgraded
1716 package(s). “only-if-needed” - are upgraded only when they do
1717 not satisfy the requirements of the upgraded package(s).
1718
1719 --force-reinstall
1720 When upgrading, reinstall all packages even if they are already
1721 up-to-date.
1722
1723 -I, --ignore-installed
1724 Ignore the installed packages (reinstalling instead).
1725
1726 --ignore-requires-python
1727 Ignore the Requires-Python information.
1728
1729 --no-deps
1730 Don’t install package dependencies.
1731
1732 --install-option <options>
1733 Extra arguments to be supplied to the setup.py install command
1734 (use like –install-option=”–install-scripts=<sys.pre‐
1735 fix>/local/bin”). Use multiple –install-option options to pass
1736 multiple options to setup.py install. If you are using an option
1737 with a directory path, be sure to use absolute path.
1738
1739 --global-option <options>
1740 Extra global options to be supplied to the setup.py call before
1741 the install command.
1742
1743 --user Install to the Python user install directory for your platform.
1744 Typically ~/.local/, or %APPDATA%Python on Windows. (See the
1745 Python documentation for site.USER_BASE for full details.)
1746
1747 --egg Install packages as eggs, not ‘flat’, like pip normally does.
1748 This option is not about installing from eggs. (WARNING: Because
1749 this option overrides pip’s normal install logic, requirements
1750 files may not behave as expected.)
1751
1752 --root <dir>
1753 Install everything relative to this alternate root directory.
1754
1755 --strip-file-prefix <prefix>
1756 Strip given prefix from script paths in wheel RECORD.
1757
1758 --prefix <dir>
1759 Installation prefix where lib, bin and other top-level folders
1760 are placed
1761
1762 --compile
1763 Compile py files to pyc
1764
1765 --no-compile
1766 Do not compile py files to pyc
1767
1768 --no-use-wheel
1769 Do not Find and prefer wheel archives when searching indexes and
1770 find-links locations. DEPRECATED in favour of –no-binary.
1771
1772 --no-binary <format_control>
1773 Do not use binary packages. Can be supplied multiple times, and
1774 each time adds to the existing value. Accepts either :all: to
1775 disable all binary packages, :none: to empty the set, or one or
1776 more package names with commas between them. Note that some
1777 packages are tricky to compile and may fail to install when this
1778 option is used on them.
1779
1780 --only-binary <format_control>
1781 Do not use source packages. Can be supplied multiple times, and
1782 each time adds to the existing value. Accepts either :all: to
1783 disable all source packages, :none: to empty the set, or one or
1784 more package names with commas between them. Packages without
1785 binary distributions will fail to install when this option is
1786 used on them.
1787
1788 --pre Include pre-release and development versions. By default, pip
1789 only finds stable versions.
1790
1791 --no-clean
1792 Don’t clean up build directories.
1793
1794 --require-hashes
1795 Require a hash to check each requirement against, for repeatable
1796 installs. This option is implied when any package in a require‐
1797 ments file has a –hash option.
1798
1799
1800
1801 -i, --index-url <url>
1802 Base URL of Python Package Index (default
1803 https://pypi.python.org/simple). This should point to a reposi‐
1804 tory compliant with PEP 503 (the simple repository API) or a
1805 local directory laid out in the same format.
1806
1807 --extra-index-url <url>
1808 Extra URLs of package indexes to use in addition to –index-url.
1809 Should follow the same rules as –index-url.
1810
1811 --no-index
1812 Ignore package index (only looking at –find-links URLs instead).
1813
1814 -f, --find-links <url>
1815 If a url or path to an html file, then parse for links to ar‐
1816 chives. If a local path or file:// url that’s a directory, then
1817 look for archives in the directory listing.
1818
1819 --process-dependency-links
1820 Enable the processing of dependency links.
1821
1822
1823 Examples
1824 1. Install SomePackage and its dependencies from PyPI using Requirement
1825 Specifiers
1826
1827 $ pip install SomePackage # latest version
1828 $ pip install SomePackage==1.0.4 # specific version
1829 $ pip install 'SomePackage>=1.0.4' # minimum version
1830
1831 2. Install a list of requirements specified in a file. See the
1832 Requirements files.
1833
1834 $ pip install -r requirements.txt
1835
1836 3. Upgrade an already installed SomePackage to the latest from PyPI.
1837
1838 $ pip install --upgrade SomePackage
1839
1840 4. Install a local project in “editable” mode. See the section on
1841 Editable Installs.
1842
1843 $ pip install -e . # project in current directory
1844 $ pip install -e path/to/project # project in another directory
1845
1846 5. Install a project from VCS in “editable” mode. See the sections on
1847 VCS Support and Editable Installs.
1848
1849 $ pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
1850 $ pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
1851 $ pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
1852 $ pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
1853 $ pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
1854
1855 6. Install a package with setuptools extras.
1856
1857 $ pip install SomePackage[PDF]
1858 $ pip install git+https://git.repo/some_pkg.git#egg=SomePackage[PDF]
1859 $ pip install SomePackage[PDF]==3.0
1860 $ pip install -e .[PDF]==3.0 # editable project in current directory
1861
1862 7. Install a particular source archive file.
1863
1864 $ pip install ./downloads/SomePackage-1.0.4.tar.gz
1865 $ pip install http://my.package.repo/SomePackage-1.0.4.zip
1866
1867 8. Install from alternative package repositories.
1868
1869 Install from a different index, and not PyPI
1870
1871 $ pip install --index-url http://my.package.repo/simple/ SomePackage
1872
1873 Search an additional index during install, in addition to PyPI
1874
1875 $ pip install --extra-index-url http://my.package.repo/simple SomePackage
1876
1877 Install from a local flat directory containing archives (and don’t
1878 scan indexes):
1879
1880 $ pip install --no-index --find-links=file:///local/dir/ SomePackage
1881 $ pip install --no-index --find-links=/local/dir/ SomePackage
1882 $ pip install --no-index --find-links=relative/dir/ SomePackage
1883
1884 9. Find pre-release and development versions, in addition to stable
1885 versions. By default, pip only finds stable versions.
1886
1887 $ pip install --pre SomePackage
1888
1889
1890 ----
1891
1892
1893
1894 [1] This is true with the exception that pip v7.0 and v7.0.1 required
1895 quotes around specifiers containing environment markers in
1896 requirement files.
1897
1898 pip download
1899 Contents
1900 · pip download
1901
1902 · Usage
1903
1904 · Description
1905
1906 · Overview
1907
1908 · Options
1909
1910 · Examples
1911
1912 Usage
1913 pip download [options] <requirement specifier> [package-index-options] ...
1914 pip download [options] -r <requirements file> [package-index-options] ...
1915 pip download [options] [-e] <vcs project url> ...
1916 pip download [options] [-e] <local project path> ...
1917 pip download [options] <archive url/path> ...
1918
1919 Description
1920 Download packages from:
1921
1922 · PyPI (and other indexes) using requirement specifiers.
1923
1924 · VCS project urls.
1925
1926 · Local project directories.
1927
1928 · Local or remote source archives.
1929
1930 pip also supports downloading from “requirements files”, which provide
1931 an easy way to specify a whole environment to be downloaded.
1932
1933
1934 Overview
1935 pip download replaces the --download option to pip install, which is
1936 now deprecated and will be removed in pip 10.
1937
1938 pip download does the same resolution and downloading as pip install,
1939 but instead of installing the dependencies, it collects the downloaded
1940 distributions into the directory provided (defaulting to the current
1941 directory). This directory can later be passed as the value to pip
1942 install --find-links to facilitate offline or locked down package
1943 installation.
1944
1945 pip download with the --platform, --python-version, --implementation,
1946 and --abi options provides the ability to fetch dependencies for an
1947 interpreter and system other than the ones that pip is running on.
1948 --only-binary=:all: is required when using any of these options. It is
1949 important to note that these options all default to the current sys‐
1950 tem/interpreter, and not to the most restrictive constraints (e.g.
1951 platform any, abi none, etc). To avoid fetching dependencies that hap‐
1952 pen to match the constraint of the current interpreter (but not your
1953 target one), it is recommended to specify all of these options if you
1954 are specifying one of them. Generic dependencies (e.g. universal
1955 wheels, or dependencies with no platform, abi, or implementation con‐
1956 straints) will still match an over- constrained download requirement.
1957
1958 Options
1959 -c, --constraint <file>
1960 Constrain versions using the given constraints file. This option
1961 can be used multiple times.
1962
1963 -e, --editable <path/url>
1964 Install a project in editable mode (i.e. setuptools “develop
1965 mode”) from a local project path or a VCS url.
1966
1967 -r, --requirement <file>
1968 Install from the given requirements file. This option can be
1969 used multiple times.
1970
1971 -b, --build <dir>
1972 Directory to unpack packages into and build in.
1973
1974 --no-deps
1975 Don’t install package dependencies.
1976
1977 --global-option <options>
1978 Extra global options to be supplied to the setup.py call before
1979 the install command.
1980
1981 --no-binary <format_control>
1982 Do not use binary packages. Can be supplied multiple times, and
1983 each time adds to the existing value. Accepts either :all: to
1984 disable all binary packages, :none: to empty the set, or one or
1985 more package names with commas between them. Note that some
1986 packages are tricky to compile and may fail to install when this
1987 option is used on them.
1988
1989 --only-binary <format_control>
1990 Do not use source packages. Can be supplied multiple times, and
1991 each time adds to the existing value. Accepts either :all: to
1992 disable all source packages, :none: to empty the set, or one or
1993 more package names with commas between them. Packages without
1994 binary distributions will fail to install when this option is
1995 used on them.
1996
1997 --src <dir>
1998 Directory to check out editable projects into. The default in a
1999 virtualenv is “<venv path>/src”. The default for global installs
2000 is “<current dir>/src”.
2001
2002 --pre Include pre-release and development versions. By default, pip
2003 only finds stable versions.
2004
2005 --no-clean
2006 Don’t clean up build directories.
2007
2008 --require-hashes
2009 Require a hash to check each requirement against, for repeatable
2010 installs. This option is implied when any package in a require‐
2011 ments file has a –hash option.
2012
2013 -d, --dest <dir>
2014 Download packages into <dir>.
2015
2016 --platform <platform>
2017 Only download wheels compatible with <platform>. Defaults to the
2018 platform of the running system.
2019
2020 --python-version <python_version>
2021 Only download wheels compatible with Python interpreter version
2022 <version>. If not specified, then the current system interpreter
2023 minor version is used. A major version (e.g. ‘2’) can be speci‐
2024 fied to match all minor revs of that major version. A minor
2025 version (e.g. ‘34’) can also be specified.
2026
2027 --implementation <implementation>
2028 Only download wheels compatible with Python implementation
2029 <implementation>, e.g. ‘pp’, ‘jy’, ‘cp’, or ‘ip’. If not speci‐
2030 fied, then the current interpreter implementation is used. Use
2031 ‘py’ to force implementation-agnostic wheels.
2032
2033 --abi <abi>
2034 Only download wheels compatible with Python abi <abi>, e.g.
2035 ‘pypy_41’. If not specified, then the current interpreter abi
2036 tag is used. Generally you will need to specify –implementa‐
2037 tion, –platform, and –python-version when using this option.
2038
2039
2040
2041 -i, --index-url <url>
2042 Base URL of Python Package Index (default
2043 https://pypi.python.org/simple). This should point to a reposi‐
2044 tory compliant with PEP 503 (the simple repository API) or a
2045 local directory laid out in the same format.
2046
2047 --extra-index-url <url>
2048 Extra URLs of package indexes to use in addition to –index-url.
2049 Should follow the same rules as –index-url.
2050
2051 --no-index
2052 Ignore package index (only looking at –find-links URLs instead).
2053
2054 -f, --find-links <url>
2055 If a url or path to an html file, then parse for links to ar‐
2056 chives. If a local path or file:// url that’s a directory, then
2057 look for archives in the directory listing.
2058
2059 --process-dependency-links
2060 Enable the processing of dependency links.
2061
2062
2063 Examples
2064 1. Download a package and all of its dependencies
2065
2066 $ pip download SomePackage
2067 $ pip download -d . SomePackage # equivalent to above
2068 $ pip download --no-index --find-links=/tmp/wheelhouse -d /tmp/otherwheelhouse SomePackage
2069
2070 2.
2071
2072 Download a package and all of its dependencies with OSX specific
2073 interpreter constraints.
2074 This forces OSX 10.10 or lower compatibility. Since OSX deps
2075 are forward compatible, this will also match
2076 macosx-10_9_x86_64, macosx-10_8_x86_64, macosx-10_8_intel,
2077 etc. It will also match deps with platform any. Also force
2078 the interpreter version to 27 (or more generic, i.e. 2) and
2079 implementation to cp (or more generic, i.e. py).
2080
2081 $ pip download \
2082 --only-binary=:all: \
2083 --platform macosx-10_10_x86_64 \
2084 --python-version 27 \
2085 --implementation cp \
2086 SomePackage
2087
2088 3.
2089
2090 Download a package and its dependencies with linux specific con‐
2091 straints.
2092 Force the interpreter to be any minor version of py3k, and
2093 only accept cp34m or none as the abi.
2094
2095 $ pip download \
2096 --only-binary=:all: \
2097 --platform linux_x86_64 \
2098 --python-version 3 \
2099 --implementation cp \
2100 --abi cp34m \
2101 SomePackage
2102
2103 4. Force platform, implementation, and abi agnostic deps.
2104
2105 $ pip download \
2106 --only-binary=:all: \
2107 --platform any \
2108 --python-version 3 \
2109 --implementation py \
2110 --abi none \
2111 SomePackage
2112
2113 5. Even when overconstrained, this will still correctly fetch the pip
2114 universal wheel.
2115
2116 $ pip download \
2117 --only-binary=:all: \
2118 --platform linux_x86_64 \
2119 --python-version 33 \
2120 --implementation cp \
2121 --abi cp34m \
2122 pip>=8
2123 $ ls pip-8.1.1-py2.py3-none-any.whl
2124 pip-8.1.1-py2.py3-none-any.whl
2125
2126 pip uninstall
2127 Contents
2128 · pip uninstall
2129
2130 · Usage
2131
2132 · Description
2133
2134 · Options
2135
2136 · Examples
2137
2138 Usage
2139 pip uninstall [options] <package> ...
2140 pip uninstall [options] -r <requirements file> ...
2141
2142 Description
2143 Uninstall packages.
2144
2145 pip is able to uninstall most installed packages. Known exceptions are:
2146
2147 · Pure distutils packages installed with python setup.py install, which
2148 leave behind no metadata to determine what files were installed.
2149
2150 · Script wrappers installed by python setup.py develop.
2151
2152
2153 Options
2154 -r, --requirement <file>
2155 Uninstall all the packages listed in the given requirements
2156 file. This option can be used multiple times.
2157
2158 -y, --yes
2159 Don’t ask for confirmation of uninstall deletions.
2160
2161
2162 Examples
2163 1. Uninstall a package.
2164
2165 $ pip uninstall simplejson
2166 Uninstalling simplejson:
2167 /home/me/env/lib/python2.7/site-packages/simplejson
2168 /home/me/env/lib/python2.7/site-packages/simplejson-2.2.1-py2.7.egg-info
2169 Proceed (y/n)? y
2170 Successfully uninstalled simplejson
2171
2172 pip freeze
2173 Contents
2174 · pip freeze
2175
2176 · Usage
2177
2178 · Description
2179
2180 · Options
2181
2182 · Examples
2183
2184 Usage
2185 pip freeze [options]
2186
2187 Description
2188 Output installed packages in requirements format.
2189
2190 packages are listed in a case-insensitive sorted order.
2191
2192
2193 Options
2194 -r, --requirement <file>
2195 Use the order in the given requirements file and its comments
2196 when generating output. This option can be used multiple times.
2197
2198 -f, --find-links <url>
2199 URL for finding packages, which will be added to the output.
2200
2201 -l, --local
2202 If in a virtualenv that has global access, do not output glob‐
2203 ally-installed packages.
2204
2205 --user Only output packages installed in user-site.
2206
2207 --all Do not skip these packages in the output: pip, setuptools, dis‐
2208 tribute, wheel
2209
2210
2211 Examples
2212 1. Generate output suitable for a requirements file.
2213
2214 $ pip freeze
2215 docutils==0.11
2216 Jinja2==2.7.2
2217 MarkupSafe==0.19
2218 Pygments==1.6
2219 Sphinx==1.2.2
2220
2221 2. Generate a requirements file and then install from it in another
2222 environment.
2223
2224 $ env1/bin/pip freeze > requirements.txt
2225 $ env2/bin/pip install -r requirements.txt
2226
2227 pip list
2228 Contents
2229 · pip list
2230
2231 · Usage
2232
2233 · Description
2234
2235 · Options
2236
2237 · Examples
2238
2239 Usage
2240 pip list [options]
2241
2242 Description
2243 List installed packages, including editables.
2244
2245 Packages are listed in a case-insensitive sorted order.
2246
2247
2248 Options
2249 -o, --outdated
2250 List outdated packages
2251
2252 -u, --uptodate
2253 List uptodate packages
2254
2255 -e, --editable
2256 List editable projects.
2257
2258 -l, --local
2259 If in a virtualenv that has global access, do not list glob‐
2260 ally-installed packages.
2261
2262 --user Only output packages installed in user-site.
2263
2264 --pre Include pre-release and development versions. By default, pip
2265 only finds stable versions.
2266
2267 --format <list_format>
2268 Select the output format among: legacy (default), columns,
2269 freeze or json.
2270
2271 --not-required
2272 List packages that are not dependencies of installed packages.
2273
2274
2275
2276 -i, --index-url <url>
2277 Base URL of Python Package Index (default
2278 https://pypi.python.org/simple). This should point to a reposi‐
2279 tory compliant with PEP 503 (the simple repository API) or a
2280 local directory laid out in the same format.
2281
2282 --extra-index-url <url>
2283 Extra URLs of package indexes to use in addition to –index-url.
2284 Should follow the same rules as –index-url.
2285
2286 --no-index
2287 Ignore package index (only looking at –find-links URLs instead).
2288
2289 -f, --find-links <url>
2290 If a url or path to an html file, then parse for links to ar‐
2291 chives. If a local path or file:// url that’s a directory, then
2292 look for archives in the directory listing.
2293
2294 --process-dependency-links
2295 Enable the processing of dependency links.
2296
2297
2298 Examples
2299 1. List installed packages.
2300
2301 $ pip list
2302 docutils (0.10)
2303 Jinja2 (2.7.2)
2304 MarkupSafe (0.18)
2305 Pygments (1.6)
2306 Sphinx (1.2.1)
2307
2308 2. List outdated packages (excluding editables), and the latest version
2309 available.
2310
2311 $ pip list --outdated
2312 docutils (Current: 0.10 Latest: 0.11)
2313 Sphinx (Current: 1.2.1 Latest: 1.2.2)
2314
2315 3. List installed packages with column formatting.
2316
2317 $ pip list --format columns
2318 Package Version
2319 ------- -------
2320 docopt 0.6.2
2321 idlex 1.13
2322 jedi 0.9.0
2323
2324 4. List outdated packages with column formatting.
2325
2326 $ pip list -o --format columns
2327 Package Version Latest Type
2328 ---------- ------- ------ -----
2329 retry 0.8.1 0.9.1 wheel
2330 setuptools 20.6.7 21.0.0 wheel
2331
2332 5. List packages that are not dependencies of other packages. Can be
2333 combined with other options.
2334
2335 $ pip list --outdated --not-required
2336 docutils (Current: 0.10 Latest: 0.11)
2337
2338 6. Use legacy formatting
2339
2340 $ pip list --format=legacy
2341 colorama (0.3.7)
2342 docopt (0.6.2)
2343 idlex (1.13)
2344 jedi (0.9.0)
2345
2346 7. Use json formatting
2347
2348 $ pip list --format=json
2349 [{'name': 'colorama', 'version': '0.3.7'}, {'name': 'docopt', 'version': '0.6.2'}, ...
2350
2351 8. Use freeze formatting
2352
2353 $ pip list --format=freeze
2354 colorama==0.3.7
2355 docopt==0.6.2
2356 idlex==1.13
2357 jedi==0.9.0
2358
2359 pip show
2360 Contents
2361 · pip show
2362
2363 · Usage
2364
2365 · Description
2366
2367 · Options
2368
2369 · Examples
2370
2371 Usage
2372 pip show [options] <package> ...
2373
2374 Description
2375 Show information about one or more installed packages.
2376
2377
2378 Options
2379 -f, --files
2380 Show the full list of installed files for each package.
2381
2382
2383 Examples
2384 1. Show information about a package:
2385
2386 $ pip show sphinx
2387 Name: Sphinx
2388 Version: 1.4.5
2389 Summary: Python documentation generator
2390 Home-page: http://sphinx-doc.org/
2391 Author: Georg Brandl
2392 Author-email: georg@python.org
2393 License: BSD
2394 Location: /my/env/lib/python2.7/site-packages
2395 Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
2396
2397 2. Show all information about a package
2398
2399 $ pip show --verbose sphinx
2400 Name: Sphinx
2401 Version: 1.4.5
2402 Summary: Python documentation generator
2403 Home-page: http://sphinx-doc.org/
2404 Author: Georg Brandl
2405 Author-email: georg@python.org
2406 License: BSD
2407 Location: /my/env/lib/python2.7/site-packages
2408 Requires: docutils, snowballstemmer, alabaster, Pygments, imagesize, Jinja2, babel, six
2409 Metadata-Version: 2.0
2410 Installer:
2411 Classifiers:
2412 Development Status :: 5 - Production/Stable
2413 Environment :: Console
2414 Environment :: Web Environment
2415 Intended Audience :: Developers
2416 Intended Audience :: Education
2417 License :: OSI Approved :: BSD License
2418 Operating System :: OS Independent
2419 Programming Language :: Python
2420 Programming Language :: Python :: 2
2421 Programming Language :: Python :: 3
2422 Framework :: Sphinx
2423 Framework :: Sphinx :: Extension
2424 Framework :: Sphinx :: Theme
2425 Topic :: Documentation
2426 Topic :: Documentation :: Sphinx
2427 Topic :: Text Processing
2428 Topic :: Utilities
2429 Entry-points:
2430 [console_scripts]
2431 sphinx-apidoc = sphinx.apidoc:main
2432 sphinx-autogen = sphinx.ext.autosummary.generate:main
2433 sphinx-build = sphinx:main
2434 sphinx-quickstart = sphinx.quickstart:main
2435 [distutils.commands]
2436 build_sphinx = sphinx.setup_command:BuildDoc
2437
2438 pip search
2439 Contents
2440 · pip search
2441
2442 · Usage
2443
2444 · Description
2445
2446 · Options
2447
2448 · Examples
2449
2450 Usage
2451 pip search [options] <query>
2452
2453 Description
2454 Search for PyPI packages whose name or summary contains <query>.
2455
2456
2457 Options
2458 -i, --index <url>
2459 Base URL of Python Package Index (default
2460 https://pypi.python.org/pypi)
2461
2462
2463 Examples
2464 1. Search for “peppercorn”
2465
2466 $ pip search peppercorn
2467 pepperedform - Helpers for using peppercorn with formprocess.
2468 peppercorn - A library for converting a token stream into [...]
2469
2470 pip wheel
2471 Contents
2472 · pip wheel
2473
2474 · Usage
2475
2476 · Description
2477
2478 · Build System Interface
2479
2480 · Customising the build
2481
2482 · Options
2483
2484 · Examples
2485
2486 Usage
2487 pip wheel [options] <requirement specifier> ...
2488 pip wheel [options] -r <requirements file> ...
2489 pip wheel [options] [-e] <vcs project url> ...
2490 pip wheel [options] [-e] <local project path> ...
2491 pip wheel [options] <archive url/path> ...
2492
2493 Description
2494 Build Wheel archives for your requirements and dependencies.
2495
2496 Wheel is a built-package format, and offers the advantage of not recom‐
2497 piling your software during every install. For more details, see the
2498 wheel docs: https://wheel.readthedocs.io/en/latest/
2499
2500 Requirements: setuptools>=0.8, and wheel.
2501
2502 ’pip wheel’ uses the bdist_wheel setuptools extension from the wheel
2503 package to build individual wheels.
2504
2505
2506 Build System Interface
2507 In order for pip to build a wheel, setup.py must implement the
2508 bdist_wheel command with the following syntax:
2509
2510 python setup.py bdist_wheel -d TARGET
2511
2512 This command must create a wheel compatible with the invoking Python
2513 interpreter, and save that wheel in the directory TARGET.
2514
2515 No other build system commands are invoked by the pip wheel command.
2516
2517 Customising the build
2518 It is possible using --global-option to include additional build com‐
2519 mands with their arguments in the setup.py command. This is currently
2520 the only way to influence the building of C extensions from the command
2521 line. For example:
2522
2523 pip wheel --global-option bdist_ext --global-option -DFOO wheel
2524
2525 will result in a build command of
2526
2527 setup.py bdist_ext -DFOO bdist_wheel -d TARGET
2528
2529 which passes a preprocessor symbol to the extension build.
2530
2531 Such usage is considered highly build-system specific and more an acci‐
2532 dent of the current implementation than a supported interface.
2533
2534 Options
2535 -w, --wheel-dir <dir>
2536 Build wheels into <dir>, where the default is the current work‐
2537 ing directory.
2538
2539 --no-use-wheel
2540 Do not Find and prefer wheel archives when searching indexes and
2541 find-links locations. DEPRECATED in favour of –no-binary.
2542
2543 --no-binary <format_control>
2544 Do not use binary packages. Can be supplied multiple times, and
2545 each time adds to the existing value. Accepts either :all: to
2546 disable all binary packages, :none: to empty the set, or one or
2547 more package names with commas between them. Note that some
2548 packages are tricky to compile and may fail to install when this
2549 option is used on them.
2550
2551 --only-binary <format_control>
2552 Do not use source packages. Can be supplied multiple times, and
2553 each time adds to the existing value. Accepts either :all: to
2554 disable all source packages, :none: to empty the set, or one or
2555 more package names with commas between them. Packages without
2556 binary distributions will fail to install when this option is
2557 used on them.
2558
2559 --build-option <options>
2560 Extra arguments to be supplied to ‘setup.py bdist_wheel’.
2561
2562 -c, --constraint <file>
2563 Constrain versions using the given constraints file. This option
2564 can be used multiple times.
2565
2566 -e, --editable <path/url>
2567 Install a project in editable mode (i.e. setuptools “develop
2568 mode”) from a local project path or a VCS url.
2569
2570 -r, --requirement <file>
2571 Install from the given requirements file. This option can be
2572 used multiple times.
2573
2574 --src <dir>
2575 Directory to check out editable projects into. The default in a
2576 virtualenv is “<venv path>/src”. The default for global installs
2577 is “<current dir>/src”.
2578
2579 --ignore-requires-python
2580 Ignore the Requires-Python information.
2581
2582 --no-deps
2583 Don’t install package dependencies.
2584
2585 -b, --build <dir>
2586 Directory to unpack packages into and build in.
2587
2588 --global-option <options>
2589 Extra global options to be supplied to the setup.py call before
2590 the ‘bdist_wheel’ command.
2591
2592 --pre Include pre-release and development versions. By default, pip
2593 only finds stable versions.
2594
2595 --no-clean
2596 Don’t clean up build directories.
2597
2598 --require-hashes
2599 Require a hash to check each requirement against, for repeatable
2600 installs. This option is implied when any package in a require‐
2601 ments file has a –hash option.
2602
2603
2604
2605 -i, --index-url <url>
2606 Base URL of Python Package Index (default
2607 https://pypi.python.org/simple). This should point to a reposi‐
2608 tory compliant with PEP 503 (the simple repository API) or a
2609 local directory laid out in the same format.
2610
2611 --extra-index-url <url>
2612 Extra URLs of package indexes to use in addition to –index-url.
2613 Should follow the same rules as –index-url.
2614
2615 --no-index
2616 Ignore package index (only looking at –find-links URLs instead).
2617
2618 -f, --find-links <url>
2619 If a url or path to an html file, then parse for links to ar‐
2620 chives. If a local path or file:// url that’s a directory, then
2621 look for archives in the directory listing.
2622
2623 --process-dependency-links
2624 Enable the processing of dependency links.
2625
2626
2627 Examples
2628 1. Build wheels for a requirement (and all its dependencies), and then
2629 install
2630
2631 $ pip wheel --wheel-dir=/tmp/wheelhouse SomePackage
2632 $ pip install --no-index --find-links=/tmp/wheelhouse SomePackage
2633
2634 pip hash
2635 Contents
2636 · pip hash
2637
2638 · Usage
2639
2640 · Description
2641
2642 · Overview
2643
2644 · Options
2645
2646 · Example
2647
2648 Usage
2649 pip hash [options] <file> ...
2650
2651 Description
2652 Compute a hash of a local package archive.
2653
2654 These can be used with –hash in a requirements file to do repeatable
2655 installs.
2656
2657
2658 Overview
2659 pip hash is a convenient way to get a hash digest for use with
2660 hash-checking mode, especially for packages with multiple archives. The
2661 error message from pip install --require-hashes ... will give you one
2662 hash, but, if there are multiple archives (like source and binary
2663 ones), you will need to manually download and compute a hash for the
2664 others. Otherwise, a spurious hash mismatch could occur when pip
2665 install is passed a different set of options, like –no-binary.
2666
2667 Options
2668 -a, --algorithm <algorithm>
2669 The hash algorithm to use: one of sha256, sha384, sha512
2670
2671
2672 Example
2673 Compute the hash of a downloaded archive:
2674
2675 $ pip download SomePackage
2676 Collecting SomePackage
2677 Downloading SomePackage-2.2.tar.gz
2678 Saved ./pip_downloads/SomePackage-2.2.tar.gz
2679 Successfully downloaded SomePackage
2680 $ pip hash ./pip_downloads/SomePackage-2.2.tar.gz
2681 ./pip_downloads/SomePackage-2.2.tar.gz:
2682 --hash=sha256:93e62e05c7ad3da1a233def6731e8285156701e3419a5fe279017c429ec67ce0
2683
2685 Pull Requests
2686 · Submit Pull Requests against the master branch.
2687
2688 · Provide a good description of what you’re doing and why.
2689
2690 · Provide tests that cover your changes and try to run the tests
2691 locally first.
2692
2693 Example. Assuming you set up GitHub account, forked pip repository from
2694 https://github.com/pypa/pip to your own page via web interface, and
2695 your fork is located at https://github.com/yourname/pip
2696
2697 $ git clone git@github.com:pypa/pip.git
2698 $ cd pip
2699 # ...
2700 $ git diff
2701 $ git add <modified> ...
2702 $ git status
2703 $ git commit
2704
2705 You may reference relevant issues in commit messages (like #1259) to
2706 make GitHub link issues and commits together, and with phrase like
2707 “fixes #1259” you can even close relevant issues automatically. Now
2708 push the changes to your fork:
2709
2710 $ git push git@github.com:yourname/pip.git
2711
2712 Open Pull Requests page at https://github.com/yourname/pip/pulls and
2713 click “New pull request”. That’s it.
2714
2715 Automated Testing
2716 All pull requests and merges to ‘master’ branch are tested in Travis
2717 based on our .travis.yml file.
2718
2719 Usually, a link to your specific travis build appears in pull requests,
2720 but if not, you can find it on our travis pull requests page
2721
2722 The only way to trigger Travis to run again for a pull request, is to
2723 submit another change to the pull branch.
2724
2725 We also have Jenkins CI that runs regularly for certain python versions
2726 on windows and centos.
2727
2728 Running tests
2729 OS Requirements: subversion, bazaar, git, and mercurial.
2730
2731 Python Requirements: tox or pytest, virtualenv, scripttest, and mock
2732
2733 Ways to run the tests locally:
2734
2735 $ tox -e py33 # The preferred way to run the tests, can use pyNN to
2736 # run for a particular version or leave off the -e to
2737 # run for all versions.
2738 $ python setup.py test # Using the setuptools test plugin
2739 $ py.test # Using py.test directly
2740 $ tox # Using tox against pip's tox.ini
2741
2742 If you are missing one of the VCS tools, you can tell py.test to skip
2743 it:
2744
2745 $ py.test -k 'not bzr'
2746 $ py.test -k 'not svn'
2747
2748 Getting Involved
2749 The pip project welcomes help in the following ways:
2750
2751 · Making Pull Requests for code, tests, or docs.
2752
2753 · Commenting on open issues and pull requests.
2754
2755 · Helping to answer questions on the mailing list.
2756
2757 If you want to become an official maintainer, start by helping out.
2758
2759 Later, when you think you’re ready, get in touch with one of the main‐
2760 tainers, and they will initiate a vote.
2761
2762 Release Process
2763 1. On the current pip master branch, generate a new AUTHORS.txt by run‐
2764 ning invoke generate.authors and commit the results.
2765
2766 2. On the current pip master branch, make a new commit which bumps the
2767 version in pip/__init__.py to the release version and adjust the
2768 CHANGES.txt file to reflect the current date.
2769
2770 3. Create a signed tag of the master branch of the form X.Y.Z using the
2771 command git tag -s X.Y.Z.
2772
2773 4. Checkout the tag using git checkout X.Y.Z and create the distribu‐
2774 tion files using python setup.py sdist bdist_wheel.
2775
2776 5. Upload the distribution files to PyPI using twine (twine upload -s
2777 dist/*). The upload should include GPG signatures of the distribu‐
2778 tion files.
2779
2780 6. Push all of the changes.
2781
2782 7. Regenerate the get-pip.py script by running invoke generate.install‐
2783 er in the get-pip repository, and committing the results.
2784
2785 Creating a Bugfix Release
2786 Sometimes we need to release a bugfix release of the form X.Y.Z+1. In
2787 order to create one of these the changes should already be merged into
2788 the master branch.
2789
2790 1. Create a new release/X.Y.Z+1 branch off of the X.Y.Z tag using the
2791 command git checkout -b release/X.Y.Z+1 X.Y.Z.
2792
2793 2. Cherry pick the fixed commits off of the master branch, fixing any
2794 conflicts and moving any changelog entries from the development ver‐
2795 sion’s changelog section to the X.Y.Z+1 section.
2796
2797 3. Push the release/X.Y.Z+1 branch to github and submit a PR for it
2798 against the master branch and wait for the tests to run.
2799
2800 4. Once tests run, merge the release/X.Y.Z+1 branch into master, and
2801 follow the above release process starting with step 4.
2802
2804 9.0.3 (2018-03-21)
2805
2806 · Fix an error where the vendored requests was not correctly containing
2807 itself to only the internal vendored prefix.
2808
2809 · Restore compatability with 2.6.
2810
2811 9.0.2 (2018-03-16)
2812
2813 · Fallback to using SecureTransport on macOS when the linked OpenSSL is
2814 too old to support TLSv1.2.
2815
2816 9.0.1 (2016-11-06)
2817
2818 · Correct the deprecation message when not specifying a –format so that
2819 it uses the correct setting name (format) rather than the incorrect
2820 one (list_format) (#4058).
2821
2822 · Fix pip check to check all available distributions and not just the
2823 local ones (#4083).
2824
2825 · Fix a crash on non ASCII characters from lsb_release (#4062).
2826
2827 · Fix an SyntaxError in an an used module of a vendored dependency (‐
2828 #4059).
2829
2830 · Fix UNC paths on Windows (#4064).
2831
2832 9.0.0 (2016-11-02)
2833
2834 · BACKWARD INCOMPATIBLE Remove the attempted autodetection of require‐
2835 ment names from URLs, URLs must include a name via #egg=.
2836
2837 · DEPRECATION pip install --egg have been deprecated and will be
2838 removed in the future. This “feature” has a long list of drawbacks
2839 which break nearly all of pip’s other features in subtle and
2840 hard-to-diagnose ways.
2841
2842 · DEPRECATION --default-vcs option (#4052).
2843
2844 · WARNING pip 9 cache can break forward compatibility with previous pip
2845 versions if your package repository allows chunked responses (#4078).
2846
2847 · Add a pip check command to check installed packages dependencies (PR
2848 #3750).
2849
2850 · Add option allowing user to abort pip operation if file/directory
2851 exists
2852
2853 · Add Appveyor CI
2854
2855 · Uninstall existing packages when performing an editable installation
2856 of the same packages (#1548).
2857
2858 · pip show is less verbose by default. --verbose prints multiline
2859 fields. (PR #3858).
2860
2861 · Add optional column formatting to pip list (#3651).
2862
2863 · Add --not-required option to pip list, which lists packages that are
2864 not dependencies of other packages.
2865
2866 · Fix builds on systems with symlinked /tmp directory for custom builds
2867 such as numpy (PR #3701).
2868
2869 · Fix regression in pip freeze: when there is more than one git remote,
2870 priority is given to the remote named origin (PR #3708, #3616).
2871
2872 · Fix crash when calling pip freeze with invalid requirement installed
2873 (PR #3704, #3681).
2874
2875 · Allow multiple --requirement files in pip freeze (PR #3703).
2876
2877 · Implementation of pep-503 data-requires-python. When this field is
2878 present for a release link, pip will ignore the download when
2879 installing to a Python version that doesn’t satisfy the requirement.
2880
2881 · pip wheel now works on editable packages too (it was only working on
2882 editable dependencies before); this allows running pip wheel on the
2883 result of pip freeze in presence of editable requirements (PR #3695,
2884 #3291).
2885
2886 · Load credentials from .netrc files (PR #3715, #3569).
2887
2888 · Add --platform, --python-version, --implementation and --abi parame‐
2889 ters to pip download. These allow utilities and advanced users to
2890 gather distributions for interpreters other than the one pip is being
2891 run on. (PR #3760)
2892
2893 · Skip scanning virtual environments, even when venv/bin/python is a
2894 dangling symlink.
2895
2896 · Added pip completion support for the fish shell.
2897
2898 · Fix problems on Windows on Python 2 when username or hostname con‐
2899 tains non-ASCII characters (#3463, PR #3970, PR #4000).
2900
2901 · Use git fetch --tags to fetch tags in addition to everything else
2902 that is normally fetched; this is necessary in case a git requirement
2903 url points to a tag or commit that is not on a branch (PR #3791)
2904
2905 · Normalize package names before using in pip show (#3976)
2906
2907 · Raise when Requires-Python do not match the running version and add
2908 --ignore-requires-python option as escape hatch (PR #3846).
2909
2910 · Report the correct installed version when performing an upgrade in
2911 some corner cases (#2382)
2912
2913 · Add -i shorthand for --index flag in pip search
2914
2915 · Do not optionally load C dependencies in requests (#1840, #2930,
2916 #3024)
2917
2918 · Strip authentication from SVN url prior to passing it to svn (PR
2919 #3697, #3209).
2920
2921 · Also install in platlib with --target option (PR #3694, #3682).
2922
2923 · Restore the ability to use inline comments in requirements files
2924 passed to pip freeze (#3680).
2925
2926 8.1.2 (2016-05-10)
2927
2928 · Fix a regression on systems with uninitialized locale (#3575).
2929
2930 · Use environment markers to filter packages before determining if a
2931 required wheel is supported. Solves (#3254).
2932
2933 · Make glibc parsing for manylinux1 support more robust for the variety
2934 of glibc versions found in the wild (#3588).
2935
2936 · Update environment marker support to fully support PEP 508 and legacy
2937 environment markers (#3624).
2938
2939 · Always use debug logging to the --log file (#3351).
2940
2941 · Don’t attempt to wrap search results for extremely narrow terminal
2942 windows (#3655).
2943
2944 8.1.1 (2016-03-17)
2945
2946 · Fix regression with non-ascii requirement files on Python 2 and add
2947 support for encoding headers in requirement files (#3548, PR #3547).
2948
2949 8.1.0 (2016-03-05)
2950
2951 · Implement PEP 513, which adds support for the manylinux1 platform
2952 tag, allowing carefully compiled binary wheels to be installed on
2953 compatible Linux platforms.
2954
2955 · Allow wheels which are not specific to a particular Python inter‐
2956 preter but which are specific to a particular platform (#3202).
2957
2958 · Fixed an issue where call_subprocess would crash trying to print
2959 debug data on child process failure (#3521, PR #3522).
2960
2961 · Exclude the wheel package from the pip freeze output (like pip and
2962 setuptools). #2989.
2963
2964 · Allow installing modules from a subdirectory of a vcs repository in
2965 non-editable mode (#3217, PR #3466).
2966
2967 · Make pip wheel and pip download work with vcs urls with subdirectory
2968 option (PR #3466).
2969
2970 · Show classifiers in pip show.
2971
2972 · Show PEP376 Installer in pip show (#3517).
2973
2974 · Unhide completion command (PR #1810).
2975
2976 · Show latest version number in pip search results (PR #1415).
2977
2978 · Decode requirement files according to their BOM if present (PR #3485,
2979 #2865).
2980
2981 · Fix and deprecate package name detection from url path (#3523 and PR
2982 #3495).
2983
2984 · Correct the behavior where interpreter specific tags (such as cp34)
2985 were being used on later versions of the same interpreter instead of
2986 only for that specific interpreter (#3472).
2987
2988 · Fix an issue where pip would erroneously install a 64 bit wheel on a
2989 32 bit Python running on a 64 bit macOS machine.
2990
2991 · Do not assume that all git repositories have an origin remote.
2992
2993 · Correctly display the line to add to a requirements.txt for an URL
2994 based dependency when --require-hashes is enabled.
2995
2996 8.0.3 (2016-02-25)
2997
2998 · Make install --quiet really quiet. See #3418.
2999
3000 · Fix a bug when removing packages in python 3: disable INI-style pars‐
3001 ing of the entry_point.txt file to allow entry point names with
3002 colons (PR #3434)
3003
3004 · Normalize generated script files path in RECORD files. (PR #3448)
3005
3006 · Fix bug introduced in 8.0.0 where subcommand output was not shown,
3007 even when the user specified -v / --verbose. #3486.
3008
3009 · Enable python -W with respect to PipDeprecationWarning. (PR #3455)
3010
3011 · Upgrade distlib to 0.2.2 (fix #3467):
3012
3013 · Improved support for Jython when quoting executables in output
3014 scripts.
3015
3016 · Add a –all option to pip freeze to include usually skipped package
3017 (like pip, setuptools and wheel) to the freeze output. #1610.
3018
3019 8.0.2 (2016-01-21)
3020
3021 · Stop attempting to trust the system CA trust store because it’s
3022 extremely common for them to be broken, often in incompatible ways.
3023 See PR #3416.
3024
3025 8.0.1 (2016-01-21)
3026
3027 · Detect CAPaths in addition to CAFiles on platforms that provide them.
3028
3029 · Installing argparse or wsgiref will no longer warn or error - pip
3030 will allow the installation even though it may be useless (since the
3031 installed thing will be shadowed by the standard library).
3032
3033 · Upgrading a distutils installed item that is installed outside of a
3034 virtual environment, while inside of a virtual environment will no
3035 longer warn or error.
3036
3037 · Fix a bug where pre-releases were showing up in pip list --outdated
3038 without the --pre flag.
3039
3040 · Switch the SOABI emulation from using RuntimeWarnings to debug log‐
3041 ging.
3042
3043 · Rollback the removal of the ability to uninstall distutils installed
3044 items until a future date.
3045
3046 8.0.0 (2016-01-19)
3047
3048 · BACKWARD INCOMPATIBLE Drop support for Python 3.2.
3049
3050 · BACKWARD INCOMPATIBLE Remove the ability to find any files other than
3051 the ones directly linked from the index or find-links pages.
3052
3053 · BACKWARD INCOMPATIBLE Remove the --download-cache which had been dep‐
3054 recated and no-op’d in 6.0.
3055
3056 · BACKWARD INCOMPATIBLE Remove the --log-explicit-levels which had been
3057 deprecated in 6.0.
3058
3059 · BACKWARD INCOMPATIBLE Change pip wheel –wheel-dir default path from
3060 <cwd>/wheelhouse to <cwd>.
3061
3062 · Deprecate and no-op the --allow-external, --allow-all-external, and
3063 --allow-unverified functionality that was added as part of PEP 438.
3064 With changes made to the repository protocol made in PEP 470, these
3065 options are no longer functional.
3066
3067 · Allow --trusted-host within a requirements file. #2822.
3068
3069 · Allow --process-dependency-links within a requirements file. #1274.
3070
3071 · Allow --pre within a requirements file. #1273.
3072
3073 · Allow repository URLs with secure transports to count as trusted.
3074 (E.g., “git+ssh” is okay.) #2811.
3075
3076 · Implement a top-level pip download command and deprecate pip install
3077 --download.
3078
3079 · Fixed #3141, when uninstalling, look for the case of paths containing
3080 symlinked directories (PR #3154)
3081
3082 · When installing, if building a wheel fails, clear up the build direc‐
3083 tory before falling back to a source install. #3047.
3084
3085 · Fix user directory expansion when HOME=/. Workaround for Python bug
3086 http://bugs.python.org/issue14768, reported in #2996.
3087
3088 · Fixed #3009, correct reporting of requirements file line numbers (PR
3089 #3125)
3090
3091 · Fixed #1062, Exception(IOError) for pip freeze and pip list commands
3092 with subversion >= 1.7. (PR #3346)
3093
3094 · Provide a spinner showing that progress is happening when installing
3095 or building a package via setup.py. This will alleviate concerns that
3096 projects with unusually long build times have with pip appearing to
3097 stall.
3098
3099 · Include the functionality of peep into pip, allowing hashes to be
3100 baked into a requirements file and ensuring that the packages being
3101 downloaded match one of those hashes. This is an additional, opt-in
3102 security measure that, when used, removes the need to trust the
3103 repository.
3104
3105 · Fix a bug causing pip to not select a wheel compiled against an OSX
3106 SDK later than what Python itself was compiled against when running
3107 on a newer version of OSX.
3108
3109 · Add a new --prefix option for pip install that supports wheels and
3110 sdists. (PR #3252)
3111
3112 · Fixed #2042 regarding wheel building with setup.py using a different
3113 encoding than the system.
3114
3115 · Drop PasteScript specific egg_info hack. (PR #3270)
3116
3117 · Allow combination of pip list options –editable with –outdated/–upto‐
3118 date. (#933)
3119
3120 · Gives VCS implementations control over saying whether a project is
3121 under their control (PR #3258)
3122
3123 · Git detection now works when setup.py is not at the Git repo root and
3124 when package_dir is used, so pip freeze works in more cases (PR
3125 #3258)
3126
3127 · Correctly freeze Git develop packages in presence of the &subdirec‐
3128 tory option (PR #3258)
3129
3130 · The detection of editable packages now relies on the presence of
3131 .egg-link instead of looking for a VCS, so pip list -e is more reli‐
3132 able (PR #3258)
3133
3134 · Add the --prefix flag to pip install which allows specifying a root
3135 prefix to use instead of sys.prefix (PR #3252).
3136
3137 · Allow duplicate specifications in the case that only the extras dif‐
3138 fer, and union all specified extras together (PR #3198).
3139
3140 · Fix the detection of the user’s current platform on OSX when deter‐
3141 mining the OSX SDK version (PR #3232).
3142
3143 · Prevent the automatically built wheels from mistakenly being used
3144 across multiple versions of Python when they may not be correctly
3145 configured for that by making the wheel specific to a specific ver‐
3146 sion of Python and specific interpreter (PR #3225).
3147
3148 · Emulate the SOABI support in wheels from Python 2.x on Python 2.x as
3149 closely as we can with the information available within the inter‐
3150 preter (PR #3075).
3151
3152 · Don’t roundtrip to the network when git is pinned to a specific com‐
3153 mit hash and that hash already exists locally (PR #3066).
3154
3155 · Prefer wheels built against a newer SDK to wheels built against an
3156 older SDK on OSX (PR #3163).
3157
3158 · Show entry points for projects installed via wheel (PR #3122).
3159
3160 · Improve message when an unexisting path is passed to –find-links
3161 option (#2968).
3162
3163 · pip freeze does not add the VCS branch/tag name in the #egg=… frag‐
3164 ment anymore (PR #3312).
3165
3166 · Warn on installation of editable if the provided #egg=name part does
3167 not match the metadata produced by setup.py egg_info. #3143.
3168
3169 · Add support for .xz files for python versions supporting them (>=
3170 3.3). #722.
3171
3172 7.1.2 (2015-08-22)
3173
3174 · Don’t raise an error if pip is not installed when checking for the
3175 latest pip version.
3176
3177 7.1.1 (2015-08-20)
3178
3179 · Check that the wheel cache directory is writable before we attempt to
3180 write cached files to them.
3181
3182 · Move the pip version check until after any installs have been per‐
3183 formed, thus removing the extraneous warning when upgrading pip.
3184
3185 · Added debug logging when using a cached wheel.
3186
3187 · Respect platlib by default on platforms that have it separated from
3188 purelib.
3189
3190 · Upgrade packaging to 15.3.
3191
3192 · Normalize post-release spellings for rev/r prefixes.
3193
3194 · Upgrade distlib to 0.2.1.
3195
3196 · Updated launchers to decode shebangs using UTF-8. This allows
3197 non-ASCII pathnames to be correctly handled.
3198
3199 · Ensured that the executable written to shebangs is normcased.
3200
3201 · Changed ScriptMaker to work better under Jython.
3202
3203 · Upgrade ipaddress to 1.0.13.
3204
3205 7.1.0 (2015-06-30)
3206
3207 · Allow constraining versions globally without having to know exactly
3208 what will be installed by the pip command. #2731.
3209
3210 · Accept –no-binary and –only-binary via pip.conf. #2867.
3211
3212 · Allow --allow-all-external within a requirements file.
3213
3214 · Fixed an issue where --user could not be used when --prefix was used
3215 in a distutils configuration file.
3216
3217 · Fixed an issue where the SOABI tags were not correctly being gener‐
3218 ated on Python 3.5.
3219
3220 · Fixed an issue where we were advising windows users to upgrade by
3221 directly executing pip, when that would always fail on Windows.
3222
3223 · Allow ~ to be expanded within a cache directory in all situations.
3224
3225 7.0.3 (2015-06-01)
3226
3227 · Fixed a regression where --no-cache-dir would raise an exception,
3228 fixes #2855.
3229
3230 7.0.2 (2015-06-01)
3231
3232 · BACKWARD INCOMPATIBLE Revert the change (released in v7.0.0) that
3233 required quoting in requirements files around specifiers containing
3234 environment markers. (PR #2841)
3235
3236 · BACKWARD INCOMPATIBLE Revert the accidental introduction of support
3237 for options interleaved with requirements, version specifiers etc in
3238 requirements files. (PR #2841)
3239
3240 · Expand ~ in the cache directory when caching wheels, fixes #2816.
3241
3242 · Use python -m pip instead of pip when recommending an upgrade command
3243 to Windows users.
3244
3245 7.0.1 (2015-05-22)
3246
3247 · Don’t build and cache wheels for non-editable installations from
3248 VCSs.
3249
3250 · Allow --allow-all-external inside of a requirements.txt file, fixing
3251 a regression in 7.0.
3252
3253 7.0.0 (2015-05-21)
3254
3255 · BACKWARD INCOMPATIBLE Removed the deprecated --mirror, --use-mirrors,
3256 and -M options.
3257
3258 · BACKWARD INCOMPATIBLE Removed the deprecated zip and unzip commands.
3259
3260 · BACKWARD INCOMPATIBLE Removed the deprecated --no-install and
3261 --no-download options.
3262
3263 · BACKWARD INCOMPATIBLE No longer implicitly support an insecure origin
3264 origin, and instead require insecure origins be explicitly trusted
3265 with the --trusted-host option.
3266
3267 · BACKWARD INCOMPATIBLE Removed the deprecated link scraping that
3268 attempted to parse HTML comments for a specially formatted comment.
3269
3270 · BACKWARD INCOMPATIBLE Requirements in requirements files containing
3271 markers must now be quoted due to parser changes from (PR #2697) and
3272 (PR #2725). For example, use "SomeProject; python_version < '2.7'",
3273 not simply SomeProject; python_version < '2.7'
3274
3275 · get-pip.py now installs the “wheel” package, when it’s not already
3276 installed (PR #2800).
3277
3278 · Ignores bz2 archives if Python wasn’t compiled with bz2 support.
3279 Fixes #497
3280
3281 · Support --install-option and --global-option per requirement in
3282 requirement files (PR #2537)
3283
3284 · Build Wheels prior to installing from sdist, caching them in the pip
3285 cache directory to speed up subsequent installs. (PR #2618)
3286
3287 · Allow fine grained control over the use of wheels and source builds.
3288 (PR #2699)
3289
3290 · --no-use-wheel and --use-wheel are deprecated in favour of new
3291 options --no-binary and --only-binary. The equivalent of
3292 --no-use-wheel is --no-binary=:all:. (PR #2699)
3293
3294 · The use of --install-option, --global-option or --build-option dis‐
3295 able the use of wheels, and the autobuilding of wheels. (PR #2711)
3296 Fixes #2677
3297
3298 · Improve logging when a requirement marker doesn’t match your environ‐
3299 ment (PR #2735)
3300
3301 · Removed the temporary modifications (that began in pip v1.4 when dis‐
3302 tribute and setuptools merged) that allowed distribute to be consid‐
3303 ered a conflict to setuptools. pip install -U setuptools will no
3304 longer upgrade “distribute” to “setuptools”. Instead, use pip
3305 install -U distribute (PR #2767).
3306
3307 · Only display a warning to upgrade pip when the newest version is a
3308 final release and it is not a post release of the version we already
3309 have installed (PR #2766).
3310
3311 · Display a warning when attempting to access a repository that uses
3312 HTTPS when we don’t have Python compiled with SSL support (PR #2761).
3313
3314 · Allowing using extras when installing from a file path without
3315 requiring the use of an editable (PR #2785).
3316
3317 · Fix an infinite loop when the cache directory is stored on a file
3318 system which does not support hard links (PR #2796).
3319
3320 · Remove the implicit debug log that was written on every invocation,
3321 instead users will need to use --log if they wish to have one (PR
3322 #2798).
3323
3324 6.1.1 (2015-04-07)
3325
3326 · No longer ignore dependencies which have been added to the standard
3327 library, instead continue to install them.
3328
3329 6.1.0 (2015-04-07)
3330
3331 · Fixes #2502. Upgrades were failing when no potential links were found
3332 for dependencies other than the current installation. (PR #2538)
3333
3334 · Use a smoother progress bar when the terminal is capable of handling
3335 it, otherwise fallback to the original ASCII based progress bar.
3336
3337 · Display much less output when pip install succeeds, because on suc‐
3338 cess, users probably don’t care about all the nitty gritty details of
3339 compiling and installing. When pip install fails, display the failed
3340 install output once instead of twice, because once is enough. (PR
3341 #2487)
3342
3343 · Upgrade the bundled copy of requests to 2.6.0, fixing CVE-2015-2296.
3344
3345 · Display format of latest package when using pip list --outdated. (PR
3346 #2475)
3347
3348 · Don’t use pywin32 as ctypes should always be available on Windows,
3349 using pywin32 prevented uninstallation of pywin32 on Windows. (PR
3350 #2467)
3351
3352 · Normalize the --wheel-dir option, expanding out constructs such as ~
3353 when used (PR #2441).
3354
3355 · Display a warning when an undefined extra has been requested. (PR
3356 #2142)
3357
3358 · Speed up installing a directory in certain cases by creating a sdist
3359 instead of copying the entire directory. (PR #2535)
3360
3361 · Don’t follow symlinks when uninstalling files (PR #2552)
3362
3363 · Upgrade the bundled copy of cachecontrol from 0.11.1 to 0.11.2.
3364 Fixes #2481 (PR #2595)
3365
3366 · Attempt to more smartly choose the order of installation to try and
3367 install dependencies before the projects that depend on them. (PR
3368 #2616)
3369
3370 · Skip trying to install libraries which are part of the standard
3371 library. (PR #2636, PR #2602)
3372
3373 · Support arch specific wheels that are not tied to a specific Python
3374 ABI. (PR #2561)
3375
3376 · Output warnings and errors to stderr instead of stdout. (PR #2543)
3377
3378 · Adjust the cache dir file checks to only check ownership if the
3379 effective user is root. (PR #2396)
3380
3381 · Install headers into a per project name directory instead of all of
3382 them into the root directory when inside of a virtual environment. (‐
3383 PR #2421)
3384
3385 6.0.8 (2015-02-04)
3386
3387 · Fix an issue where the --download flag would cause pip to no longer
3388 use randomized build directories.
3389
3390 · Fix an issue where pip did not properly unquote quoted URLs which
3391 contain characters like PEP 440’s epoch separator (!).
3392
3393 · Fix an issue where distutils installed projects were not actually
3394 uninstalled and deprecate attempting to uninstall them altogether.
3395
3396 · Retry deleting directories in case a process like an antivirus is
3397 holding the directory open temporarily.
3398
3399 · Fix an issue where pip would hide the cursor on Windows but would not
3400 reshow it.
3401
3402 6.0.7 (2015-01-28)
3403
3404 · Fix a regression where Numpy requires a build path without symlinks
3405 to properly build.
3406
3407 · Fix a broken log message when running pip wheel without a require‐
3408 ment.
3409
3410 · Don’t mask network errors while downloading the file as a hash fail‐
3411 ure.
3412
3413 · Properly create the state file for the pip version check so it only
3414 happens once a week.
3415
3416 · Fix an issue where switching between Python 3 and Python 2 would
3417 evict cached items.
3418
3419 · Fix a regression where pip would be unable to successfully uninstall
3420 a project without a normalized version.
3421
3422 6.0.6 (2015-01-03)
3423
3424 · Continue the regression fix from 6.0.5 which was not a complete fix.
3425
3426 6.0.5 (2015-01-03)
3427
3428 · Fix a regression with 6.0.4 under Windows where most commands would
3429 raise an exception due to Windows not having the os.geteuid() func‐
3430 tion.
3431
3432 6.0.4 (2015-01-03)
3433
3434 · Fix an issue where ANSI escape codes would be used on Windows even
3435 though the Windows shell does not support them, causing odd charac‐
3436 ters to appear with the progress bar.
3437
3438 · Fix an issue where using -v would cause an exception saying TypeEr‐
3439 ror: not all arguments converted during string formatting.
3440
3441 · Fix an issue where using -v with dependency links would cause an
3442 exception saying TypeError: 'InstallationCandidate' object is not
3443 iterable.
3444
3445 · Fix an issue where upgrading distribute would cause an exception say‐
3446 ing TypeError: expected string or buffer.
3447
3448 · Show a warning and disable the use of the cache directory when the
3449 cache directory is not owned by the current user, commonly caused by
3450 using sudo without the -H flag.
3451
3452 · Update PEP 440 support to handle the latest changes to PEP 440, par‐
3453 ticularly the changes to >V and <V so that they no longer imply
3454 !=V.*.
3455
3456 · Document the default cache directories for each operating system.
3457
3458 · Create the cache directory when the pip version check needs to save
3459 to it instead of silently logging an error.
3460
3461 · Fix a regression where the -q flag would not properly suppress the
3462 display of the progress bars.
3463
3464 6.0.3 (2014-12-23)
3465
3466 · Fix an issue where the implicit version check new in pip 6.0 could
3467 cause pip to block for up to 75 seconds if PyPI was not accessible.
3468
3469 · Make --no-index imply --disable-pip-version-check.
3470
3471 6.0.2 (2014-12-23)
3472
3473 · Fix an issue where the output saying that a package was installed
3474 would report the old version instead of the new version during an
3475 upgrade.
3476
3477 · Fix left over merge conflict markers in the documentation.
3478
3479 · Document the backwards incompatible PEP 440 change in the 6.0.0
3480 changelog.
3481
3482 6.0.1 (2014-12-22)
3483
3484 · Fix executable file permissions for Wheel files when using the distu‐
3485 tils scripts option.
3486
3487 · Fix a confusing error message when an exceptions was raised at cer‐
3488 tain points in pip’s execution.
3489
3490 · Fix the missing list of versions when a version cannot be found that
3491 matches the specifiers.
3492
3493 · Add a warning about the possibly problematic use of > when the given
3494 specifier doesn’t match anything.
3495
3496 · Fix an issue where installing from a directory would not copy over
3497 certain directories which were being excluded, however some build
3498 systems rely on them.
3499
3500 6.0 (2014-12-22)
3501
3502 · PROCESS Version numbers are now simply X.Y where the leading 1 has
3503 been dropped.
3504
3505 · BACKWARD INCOMPATIBLE Dropped support for Python 3.1.
3506
3507 · BACKWARD INCOMPATIBLE Removed the bundle support which was deprecated
3508 in 1.4. (PR #1806)
3509
3510 · BACKWARD INCOMPATIBLE File lists generated by pip show -f are now
3511 rooted at the location reported by show, rather than one (unstated)
3512 directory lower. (PR #1933)
3513
3514 · BACKWARD INCOMPATIBLE The ability to install files over the FTP pro‐
3515 tocol was accidentally lost in pip 1.5 and it has now been decided to
3516 not restore that ability.
3517
3518 · BACKWARD INCOMPATIBLE PEP 440 is now fully implemented, this means
3519 that in some cases versions will sort differently or version speci‐
3520 fiers will be interpreted differently than previously. The common
3521 cases should all function similarly to before.
3522
3523 · DEPRECATION pip install --download-cache and pip wheel --down‐
3524 load-cache command line flags have been deprecated and the function‐
3525 ality removed. Since pip now automatically configures and uses it’s
3526 internal HTTP cache which supplants the --download-cache the existing
3527 options have been made non functional but will still be accepted
3528 until their removal in pip v8.0. For more information please see
3529 https://pip.pypa.io/en/stable/reference/pip_install.html#caching
3530
3531 · DEPRECATION pip install --build and pip install --no-clean are now
3532 NOT deprecated. This reverses the deprecation that occurred in
3533 v1.5.3. See #906 for discussion.
3534
3535 · DEPRECATION Implicitly accessing URLs which point to an origin which
3536 is not a secure origin, instead requiring an opt-in for each host
3537 using the new --trusted-host flag (pip install --trusted-host exam‐
3538 ple.com foo).
3539
3540 · Allow the new --trusted-host flag to also disable TLS verification
3541 for a particular hostname.
3542
3543 · Added a --user flag to pip freeze and pip list to check the user site
3544 directory only.
3545
3546 · Fixed #1873. Silence byte compile errors when installation succeed.
3547
3548 · Added a virtualenv-specific configuration file. (PR #1364)
3549
3550 · Added site-wide configuration files. (PR #1978)
3551
3552 · Added an automatic check to warn if there is an updated version of
3553 pip available (PR #2049).
3554
3555 · wsgiref and argparse (for >py26) are now excluded from pip list and
3556 pip freeze (PR #1606, PR #1369)
3557
3558 · Fixed #1424. Add --client-cert option for SSL client certificates.
3559
3560 · Fixed #1484. pip show –files was broken for wheel installs. (PR
3561 #1635)
3562
3563 · Fixed #1641. install_lib should take precedence when reading distu‐
3564 tils config. (PR #1642)
3565
3566 · Send Accept-Encoding: identity when downloading files in an attempt
3567 to convince some servers who double compress the downloaded file to
3568 stop doing so. (PR #1688)
3569
3570 · Fixed #1559. Stop breaking when given pip commands in uppercase (PR
3571 #1725)
3572
3573 · Fixed #1618. Pip no longer adds duplicate logging consumers, so it
3574 won’t create duplicate output when being called multiple times. (PR
3575 #1723)
3576
3577 · Fixed #1769. pip wheel now returns an error code if any wheels fail
3578 to build.
3579
3580 · Fixed #1775. pip wheel wasn’t building wheels for dependencies of
3581 editable requirements.
3582
3583 · Allow the use of --no-use-wheel within a requirements file. (PR
3584 #1859)
3585
3586 · Fixed #1680. Attempt to locate system TLS certificates to use instead
3587 of the included CA Bundle if possible. (PR #1866)
3588
3589 · Fixed #1319. Allow use of Zip64 extension in Wheels and other zip
3590 files. (PR #1868)
3591
3592 · Fixed #1101. Properly handle an index or –find-links target which has
3593 a <base> without a href attribute. (PR #1869)
3594
3595 · Fixed #1885. Properly handle extras when a project is installed via
3596 Wheel. (PR #1896)
3597
3598 · Fixed #1180. Added support to respect proxies in pip search. It also
3599 fixes #932 and #1104. (PR #1902)
3600
3601 · Fixed #798 and #1060. pip install –download works with vcs links. (‐
3602 PR #1926)
3603
3604 · Fixed #1456. Disabled warning about insecure index host when using
3605 localhost. Based off of Guy Rozendorn’s work in PR #1718. (PR #1967)
3606
3607 · Allow the use of OS standard user configuration files instead of ones
3608 simply based around $HOME. (PR #2021)
3609
3610 · Fixed #1825. When installing directly from wheel paths or urls, pre‐
3611 vious versions were not uninstalled. This also fixes #804 specifi‐
3612 cally for the case of wheel archives. (PR #1838)
3613
3614 · Fixed #2075, detect the location of the .egg-info directory by look‐
3615 ing for any file located inside of it instead of relying on the
3616 record file listing a directory. (PR #2076)
3617
3618 · Fixed #1964, #1935, #676, Use a randomized and secure default build
3619 directory when possible. (PR #2122, CVE-2014-8991)
3620
3621 · Fixed #1433. Support environment markers in requirements.txt files.
3622 (PR #2134)
3623
3624 · Automatically retry failed HTTP requests by default. (PR #1444, PR
3625 #2147)
3626
3627 · Fixed #1100 - Handle HTML Encoding better using a method that is more
3628 similar to how browsers handle it. (PR #1874)
3629
3630 · Reduce the verbosity of the pip command by default. (PR #2175, PR
3631 #2177, PR #2178)
3632
3633 · Fixed #2031 - Respect sys.executable on OSX when installing from
3634 Wheels.
3635
3636 · Display the entire URL of the file that is being downloaded when
3637 downloading from a non PyPI repository (PR #2183).
3638
3639 · Support setuptools style environment markers in a source distribution
3640 (PR #2153).
3641
3642 1.5.6 (2014-05-16)
3643
3644 · Upgrade requests to 2.3.0 to fix an issue with proxies on Python
3645 3.4.1 (PR #1821).
3646
3647 1.5.5 (2014-05-03)
3648
3649 · Fixes #1632. Uninstall issues on debianized pypy, specifically
3650 issues with setuptools upgrades. (PR #1743)
3651
3652 · Update documentation to point at https://bootstrap.pypa.io/get-pip.py
3653 for bootstrapping pip.
3654
3655 · Update docs to point to https://pip.pypa.io/
3656
3657 · Upgrade the bundled projects (distlib==0.1.8, html5lib==1.0b3,
3658 six==1.6.1, colorama==0.3.1, setuptools==3.4.4).
3659
3660 1.5.4 (2014-02-21)
3661
3662 · Correct deprecation warning for pip install --build to only notify
3663 when the –build value is different than the default.
3664
3665 1.5.3 (2014-02-20)
3666
3667 · DEPRECATION pip install --build and pip install --no-clean are now
3668 deprecated. See #906 for discussion.
3669
3670 · Fixed #1112. Couldn’t download directly from wheel paths/urls, and
3671 when wheel downloads did occur using requirement specifiers, depen‐
3672 dencies weren’t downloaded (PR #1527)
3673
3674 · Fixed #1320. pip wheel was not downloading wheels that already
3675 existed (PR #1524)
3676
3677 · Fixed #1111. pip install --download was failing using local
3678 --find-links (PR #1524)
3679
3680 · Workaround for Python bug http://bugs.python.org/issue20053 (PR
3681 #1544)
3682
3683 · Don’t pass a unicode __file__ to setup.py on Python 2.x (PR #1583)
3684
3685 · Verify that the Wheel version is compatible with this pip (PR #1569)
3686
3687 1.5.2 (2014-01-26)
3688
3689 · Upgraded the vendored pkg_resources and _markerlib to setuptools 2.1.
3690
3691 · Fixed an error that prevented accessing PyPI when pyopenssl,
3692 ndg-httpsclient, and pyasn1 are installed
3693
3694 · Fixed an issue that caused trailing comments to be incorrectly
3695 included as part of the URL in a requirements file
3696
3697 1.5.1 (2014-01-20)
3698
3699 · pip now only requires setuptools (any setuptools, not a certain ver‐
3700 sion) when installing distributions from src (i.e. not from wheel).
3701 (PR #1434).
3702
3703 · get-pip.py now installs setuptools, when it’s not already installed
3704 (PR #1475)
3705
3706 · Don’t decode downloaded files that have a Content-Encoding header.
3707 (PR #1435)
3708
3709 · Fix to correctly parse wheel filenames with single digit versions.
3710 (PR #1445)
3711
3712 · If –allow-unverified is used assume it also means –allow-external.
3713 (PR #1457)
3714
3715 1.5 (2014-01-01)
3716
3717 · BACKWARD INCOMPATIBLE pip no longer supports the --use-mirrors, -M,
3718 and --mirrors flags. The mirroring support has been removed. In order
3719 to use a mirror specify it as the primary index with -i or
3720 --index-url, or as an additional index with --extra-index-url. (PR
3721 #1098, CVE-2013-5123)
3722
3723 · BACKWARD INCOMPATIBLE pip no longer will scrape insecure external
3724 urls by default nor will it install externally hosted files by
3725 default. Users may opt into installing externally hosted or insecure
3726 files or urls using --allow-external PROJECT and --allow-unverified
3727 PROJECT. (PR #1055)
3728
3729 · BACKWARD INCOMPATIBLE pip no longer respects dependency links by
3730 default. Users may opt into respecting them again using
3731 --process-dependency-links.
3732
3733 · DEPRECATION pip install --no-install and pip install --no-download
3734 are now formally deprecated. See #906 for discussion on possible
3735 alternatives, or lack thereof, in future releases.
3736
3737 · DEPRECATION pip zip and pip unzip are now formally deprecated.
3738
3739 · pip will now install Mac OSX platform wheels from PyPI. (PR #1278)
3740
3741 · pip now generates the appropriate platform-specific console scripts
3742 when installing wheels. (PR #1251)
3743
3744 · Pip now confirms a wheel is supported when installing directly from a
3745 path or url. (PR #1315)
3746
3747 · Fixed #1097, --ignore-installed now behaves again as designed, after
3748 it was unintentionally broke in v0.8.3 when fixing #14 (PR #1352).
3749
3750 · Fixed a bug where global scripts were being removed when uninstalling
3751 –user installed packages (PR #1353).
3752
3753 · Fixed #1163, –user wasn’t being respected when installing scripts
3754 from wheels (PR #1176).
3755
3756 · Fixed #1150, we now assume ‘_’ means ‘-‘ in versions from wheel file‐
3757 names (PR #1158).
3758
3759 · Fixed #219, error when using –log with a failed install (PR #1205).
3760
3761 · Fixed #1131, logging was buffered and choppy in Python 3.
3762
3763 · Fixed #70, –timeout was being ignored (PR #1202).
3764
3765 · Fixed #772, error when setting PIP_EXISTS_ACTION (PR #1201).
3766
3767 · Added colors to the logging output in order to draw attention to
3768 important warnings and errors. (PR #1109)
3769
3770 · Added warnings when using an insecure index, find-link, or dependency
3771 link. (PR #1121)
3772
3773 · Added support for installing packages from a subdirectory using the
3774 subdirectory editable option. ( PR #1082 )
3775
3776 · Fixed #1192. “TypeError: bad operand type for unary” in some cases
3777 when installing wheels using –find-links (PR #1218).
3778
3779 · Fixed #1133 and #317. Archive contents are now written based on sys‐
3780 tem defaults and umask (i.e. permissions are not preserved), except
3781 that regular files with any execute permissions have the equivalent
3782 of “chmod +x” applied after being written (PR #1146).
3783
3784 · PreviousBuildDirError now returns a non-zero exit code and prevents
3785 the previous build dir from being cleaned in all cases (PR #1162).
3786
3787 · Renamed –allow-insecure to –allow-unverified, however the old name
3788 will continue to work for a period of time (PR #1257).
3789
3790 · Fixed #1006, error when installing local projects with symlinks in
3791 Python 3. (PR #1311)
3792
3793 · The previously hidden --log-file option, is now shown as a general
3794 option. (PR #1316)
3795
3796 1.4.1 (2013-08-07)
3797
3798 · New Signing Key Release 1.4.1 is using a different key than normal
3799 with fingerprint: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
3800
3801 · Fixed issues with installing from pybundle files (PR #1116).
3802
3803 · Fixed error when sysconfig module throws an exception (PR #1095).
3804
3805 · Don’t ignore already installed pre-releases (PR #1076).
3806
3807 · Fixes related to upgrading setuptools (PR #1092).
3808
3809 · Fixes so that –download works with wheel archives (PR #1113).
3810
3811 · Fixes related to recognizing and cleaning global build dirs (PR
3812 #1080).
3813
3814 1.4 (2013-07-23)
3815
3816 · BACKWARD INCOMPATIBLE pip now only installs stable versions by
3817 default, and offers a new --pre option to also find pre-release and
3818 development versions. (PR #834)
3819
3820 · BACKWARD INCOMPATIBLE Dropped support for Python 2.5. The minimum
3821 supported Python version for pip 1.4 is Python 2.6.
3822
3823 · Added support for installing and building wheel archives. Thanks
3824 Daniel Holth, Marcus Smith, Paul Moore, and Michele Lacchia (PR #845)
3825
3826 · Applied security patch to pip’s ssl support related to certificate
3827 DNS wildcard matching (http://bugs.python.org/issue17980).
3828
3829 · To satisfy pip’s setuptools requirement, pip now recommends setup‐
3830 tools>=0.8, not distribute. setuptools and distribute are now merged
3831 into one project called ‘setuptools’. (PR #1003)
3832
3833 · pip will now warn when installing a file that is either hosted exter‐
3834 nally to the index or cannot be verified with a hash. In the future
3835 pip will default to not installing them and will require the flags
3836 –allow-external NAME, and –allow-insecure NAME respectively. (PR
3837 #985)
3838
3839 · If an already-downloaded or cached file has a bad hash, re-download
3840 it rather than erroring out. (#963).
3841
3842 · pip bundle and support for installing from pybundle files is now con‐
3843 sidered deprecated and will be removed in pip v1.5.
3844
3845 · Fixed a number of issues (#413, #709, #634, #602, and #939) related
3846 to cleaning up and not reusing build directories. (PR #865, #948)
3847
3848 · Added a User Agent so that pip is identifiable in logs. (PR #901)
3849
3850 · Added ssl and –user support to get-pip.py. Thanks Gabriel de
3851 Perthuis. (PR #895)
3852
3853 · Fixed the proxy support, which was broken in pip 1.3.x (PR #840)
3854
3855 · Fixed #32 - pip fails when server does not send content-type header.
3856 Thanks Hugo Lopes Tavares and Kelsey Hightower (PR #872).
3857
3858 · “Vendorized” distlib as pip.vendor.distlib (‐
3859 https://distlib.readthedocs.io/).
3860
3861 · Fixed git VCS backend with git 1.8.3. (PR #967)
3862
3863 1.3.1 (2013-03-08)
3864
3865 · Fixed a major backward incompatible change of parsing URLs to exter‐
3866 nally hosted packages that got accidentally included in 1.3.
3867
3868 1.3 (2013-03-07)
3869
3870 · SSL Cert Verification; Make https the default for PyPI access.
3871 Thanks James Cleveland, Giovanni Bajo, Marcus Smith and many others
3872 (PR #791, CVE-2013-1629).
3873
3874 · Added “pip list” for listing installed packages and the latest ver‐
3875 sion available. Thanks Rafael Caricio, Miguel Araujo, Dmitry Gladkov
3876 (PR #752)
3877
3878 · Fixed security issues with pip’s use of temp build directories.
3879 Thanks David (d1b) and Thomas Guttler. (PR #780, CVE-2013-1888)
3880
3881 · Improvements to sphinx docs and cli help. (PR #773)
3882
3883 · Fixed #707, dealing with macOS temp dir handling, which was causing
3884 global NumPy installs to fail. (PR #768)
3885
3886 · Split help output into general vs command-specific option groups.
3887 Thanks Georgi Valkov. (PR #744; PR #721 contains preceding refactor)
3888
3889 · Fixed dependency resolution when installing from archives with upper‐
3890 case project names. (PR #724)
3891
3892 · Fixed problem where re-installs always occurred when using file://
3893 find-links. (Pulls #683/#702)
3894
3895 · “pip install -v” now shows the full download url, not just the ar‐
3896 chive name. Thanks Marc Abramowitz (PR #687)
3897
3898 · Fix to prevent unnecessary PyPI redirects. Thanks Alex Gronholm (PR
3899 #695)
3900
3901 · Fixed #670 - install failure under Python 3 when the same version of
3902 a package is found under 2 different URLs. Thanks Paul Moore (PR
3903 #671)
3904
3905 · Fix git submodule recursive updates. Thanks Roey Berman. (Pulls
3906 #674)
3907
3908 · Explicitly ignore rel=’download’ links while looking for html pages.
3909 Thanks Maxime R. (PR #677)
3910
3911 · –user/–upgrade install options now work together. Thanks ‘eevee’ for
3912 discovering the problem. (PR #705)
3913
3914 · Added check in install --download to prevent re-downloading if the
3915 target file already exists. Thanks Andrey Bulgakov. (PR #669)
3916
3917 · Added support for bare paths (including relative paths) as argument
3918 to –find-links. Thanks Paul Moore for draft patch.
3919
3920 · Added support for –no-index in requirements files.
3921
3922 · Added “pip show” command to get information about an installed pack‐
3923 age. Fixes #131. Thanks Kelsey Hightower and Rafael Caricio.
3924
3925 · Added –root option for “pip install” to specify root directory.
3926 Behaves like the same option in distutils but also plays nice with
3927 pip’s egg-info. Thanks Przemek Wrzos. (#253 / PR #693)
3928
3929 1.2.1 (2012-09-06)
3930
3931 · Fixed a regression introduced in 1.2 about raising an exception when
3932 not finding any files to uninstall in the current environment. Thanks
3933 for the fix, Marcus Smith.
3934
3935 1.2 (2012-09-01)
3936
3937 · Dropped support for Python 2.4 The minimum supported Python version
3938 is now Python 2.5.
3939
3940 · Fixed #605 - pypi mirror support broken on some DNS responses. Thanks
3941 philwhin.
3942
3943 · Fixed #355 - pip uninstall removes files it didn’t install. Thanks
3944 pjdelport.
3945
3946 · Fixed issues #493, #494, #440, and #573 related to improving support
3947 for the user installation scheme. Thanks Marcus Smith.
3948
3949 · Write failure log to temp file if default location is not writable.
3950 Thanks andreigc.
3951
3952 · Pull in submodules for git editable checkouts. Fixes #289 and #421.
3953 Thanks Hsiaoming Yang and Markus Hametner.
3954
3955 · Use a temporary directory as the default build location outside of a
3956 virtualenv. Fixes issues #339 and #381. Thanks Ben Rosser.
3957
3958 · Added support for specifying extras with local editables. Thanks Nick
3959 Stenning.
3960
3961 · Added --egg flag to request egg-style rather than flat installation.
3962 Refs #3. Thanks Kamal Bin Mustafa.
3963
3964 · Fixed #510 - prevent e.g. gmpy2-2.0.tar.gz from matching a request to
3965 pip install gmpy; sdist filename must begin with full project name
3966 followed by a dash. Thanks casevh for the report.
3967
3968 · Fixed #504 - allow package URLS to have querystrings. Thanks W.
3969 Trevor King.
3970
3971 · Fixed #58 - pip freeze now falls back to non-editable format rather
3972 than blowing up if it can’t determine the origin repository of an
3973 editable. Thanks Rory McCann.
3974
3975 · Added a __main__.py file to enable python -m pip on Python versions
3976 that support it. Thanks Alexey Luchko.
3977
3978 · Fixed #487 - upgrade from VCS url of project that does exist on
3979 index. Thanks Andrew Knapp for the report.
3980
3981 · Fixed #486 - fix upgrade from VCS url of project with no distribution
3982 on index. Thanks Andrew Knapp for the report.
3983
3984 · Fixed #427 - clearer error message on a malformed VCS url. Thanks
3985 Thomas Fenzl.
3986
3987 · Added support for using any of the built in guaranteed algorithms in
3988 hashlib as a checksum hash.
3989
3990 · Fixed #321 - Raise an exception if current working directory can’t be
3991 found or accessed.
3992
3993 · Fixed #82 - Removed special casing of the user directory and use the
3994 Python default instead.
3995
3996 · Fixed #436 - Only warn about version conflicts if there is actually
3997 one. This re-enables using ==dev in requirements files.
3998
3999 · Moved tests to be run on Travis CI: http://travis-ci.org/pypa/pip
4000
4001 · Added a better help formatter.
4002
4003 1.1 (2012-02-16)
4004
4005 · Fixed #326 - don’t crash when a package’s setup.py emits UTF-8 and
4006 then fails. Thanks Marc Abramowitz.
4007
4008 · Added --target option for installing directly to arbitrary directory.
4009 Thanks Stavros Korokithakis.
4010
4011 · Added support for authentication with Subversion repositories. Thanks
4012 Qiangning Hong.
4013
4014 · Fixed #315 - --download now downloads dependencies as well. Thanks
4015 Qiangning Hong.
4016
4017 · Errors from subprocesses will display the current working directory.
4018 Thanks Antti Kaihola.
4019
4020 · Fixed #369 - compatibility with Subversion 1.7. Thanks Qiangning
4021 Hong. Note that setuptools remains incompatible with Subversion 1.7;
4022 to get the benefits of pip’s support you must use Distribute rather
4023 than setuptools.
4024
4025 · Fixed #57 - ignore py2app-generated macOS mpkg zip files in finder.
4026 Thanks Rene Dudfield.
4027
4028 · Fixed #182 - log to ~/Library/Logs/ by default on macOS framework
4029 installs. Thanks Dan Callahan for report and patch.
4030
4031 · Fixed #310 - understand version tags without minor version (“py3”) in
4032 sdist filenames. Thanks Stuart Andrews for report and Olivier Girar‐
4033 dot for patch.
4034
4035 · Fixed #7 - Pip now supports optionally installing setuptools “extras”
4036 dependencies; e.g. “pip install Paste[openid]”. Thanks Matt Maker and
4037 Olivier Girardot.
4038
4039 · Fixed #391 - freeze no longer borks on requirements files with
4040 –index-url or –find-links. Thanks Herbert Pfennig.
4041
4042 · Fixed #288 - handle symlinks properly. Thanks lebedov for the patch.
4043
4044 · Fixed #49 - pip install -U no longer reinstalls the same versions of
4045 packages. Thanks iguananaut for the pull request.
4046
4047 · Removed -E/--environment option and PIP_RESPECT_VIRTUALENV; both use
4048 a restart-in-venv mechanism that’s broken, and neither one is useful
4049 since every virtualenv now has pip inside it. Replace pip -E
4050 path/to/venv install Foo with virtualenv path/to/venv &&
4051 path/to/venv/pip install Foo.
4052
4053 · Fixed #366 - pip throws IndexError when it calls scraped_rel_links
4054
4055 · Fixed #22 - pip search should set and return a useful shell status
4056 code
4057
4058 · Fixed #351 and #365 - added global --exists-action command line
4059 option to easier script file exists conflicts, e.g. from editable
4060 requirements from VCS that have a changed repo URL.
4061
4062 1.0.2 (2011-07-16)
4063
4064 · Fixed docs issues.
4065
4066 · Fixed #295 - Reinstall a package when using the install -I option
4067
4068 · Fixed #283 - Finds a Git tag pointing to same commit as origin/master
4069
4070 · Fixed #279 - Use absolute path for path to docs in setup.py
4071
4072 · Fixed #314 - Correctly handle exceptions on Python3.
4073
4074 · Fixed #320 - Correctly parse --editable lines in requirements files
4075
4076 1.0.1 (2011-04-30)
4077
4078 · Start to use git-flow.
4079
4080 · Fixed #274 - find_command should not raise AttributeError
4081
4082 · Fixed #273 - respect Content-Disposition header. Thanks Bradley
4083 Ayers.
4084
4085 · Fixed #233 - pathext handling on Windows.
4086
4087 · Fixed #252 - svn+svn protocol.
4088
4089 · Fixed #44 - multiple CLI searches.
4090
4091 · Fixed #266 - current working directory when running setup.py clean.
4092
4093 1.0 (2011-04-04)
4094
4095 · Added Python 3 support! Huge thanks to Vinay Sajip, Vitaly Babiy,
4096 Kelsey Hightower, and Alex Gronholm, among others.
4097
4098 · Download progress only shown on a real TTY. Thanks Alex Morega.
4099
4100 · Fixed finding of VCS binaries to not be fooled by same-named directo‐
4101 ries. Thanks Alex Morega.
4102
4103 · Fixed uninstall of packages from system Python for users of
4104 Debian/Ubuntu python-setuptools package (workaround until fixed in
4105 Debian and Ubuntu).
4106
4107 · Added get-pip.py installer. Simply download and execute it, using the
4108 Python interpreter of your choice:
4109
4110 $ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
4111 $ python get-pip.py
4112
4113 This may have to be run as root.
4114
4115 NOTE:
4116 Make sure you have distribute installed before using the install‐
4117 er!
4118
4119 0.8.3
4120
4121 · Moved main repository to Github: https://github.com/pypa/pip
4122
4123 · Transferred primary maintenance from Ian to Jannis Leidel, Carl
4124 Meyer, Brian Rosner
4125
4126 · Fixed #14 - No uninstall-on-upgrade with URL package. Thanks Oliver
4127 Tonnhofer
4128
4129 · Fixed #163 - Egg name not properly resolved. Thanks Igor Sobreira
4130
4131 · Fixed #178 - Non-alphabetical installation of requirements. Thanks
4132 Igor Sobreira
4133
4134 · Fixed #199 - Documentation mentions –index instead of –index-url.
4135 Thanks Kelsey Hightower
4136
4137 · Fixed #204 - rmtree undefined in mercurial.py. Thanks Kelsey High‐
4138 tower
4139
4140 · Fixed bug in Git vcs backend that would break during reinstallation.
4141
4142 · Fixed bug in Mercurial vcs backend related to pip freeze and
4143 branch/tag resolution.
4144
4145 · Fixed bug in version string parsing related to the suffix “-dev”.
4146
4147 0.8.2
4148
4149 · Avoid redundant unpacking of bundles (from pwaller)
4150
4151 · Fixed #32, #150, #161 - Fixed checking out the correct
4152 tag/branch/commit when updating an editable Git requirement.
4153
4154 · Fixed #49 - Added ability to install version control requirements
4155 without making them editable, e.g.:
4156
4157 pip install git+https://github.com/pypa/pip/
4158
4159 · Fixed #175 - Correctly locate build and source directory on macOS.
4160
4161 · Added git+https:// scheme to Git VCS backend.
4162
4163 0.8.1
4164
4165 · Added global –user flag as shortcut for –install-option=”–user”. From
4166 Ronny Pfannschmidt.
4167
4168 · Added support for PyPI mirrors as defined in PEP 381, from Jannis
4169 Leidel.
4170
4171 · Fixed #138 - Git revisions ignored. Thanks John-Scott Atlakson.
4172
4173 · Fixed #95 - Initial editable install of github package from a tag
4174 fails. Thanks John-Scott Atlakson.
4175
4176 · Fixed #107 - Can’t install if a directory in cwd has the same name as
4177 the package you’re installing.
4178
4179 · Fixed #39 - –install-option=”–prefix=~/.local” ignored with -e.
4180 Thanks Ronny Pfannschmidt and Wil Tan.
4181
4182 0.8
4183
4184 · Track which build/ directories pip creates, never remove directories
4185 it doesn’t create. From Hugo Lopes Tavares.
4186
4187 · Pip now accepts file:// index URLs. Thanks Dave Abrahams.
4188
4189 · Various cleanup to make test-running more consistent and less frag‐
4190 ile. Thanks Dave Abrahams.
4191
4192 · Real Windows support (with passing tests). Thanks Dave Abrahams.
4193
4194 · pip-2.7 etc. scripts are created (Python-version specific scripts)
4195
4196 · contrib/build-standalone script creates a runnable .zip form of pip,
4197 from Jannis Leidel
4198
4199 · Editable git repos are updated when reinstalled
4200
4201 · Fix problem with --editable when multiple .egg-info/ directories are
4202 found.
4203
4204 · A number of VCS-related fixes for pip freeze, from Hugo Lopes
4205 Tavares.
4206
4207 · Significant test framework changes, from Hugo Lopes Tavares.
4208
4209 0.7.2
4210
4211 · Set zip_safe=False to avoid problems some people are encountering
4212 where pip is installed as a zip file.
4213
4214 0.7.1
4215
4216 · Fixed opening of logfile with no directory name. Thanks Alexandre
4217 Conrad.
4218
4219 · Temporary files are consistently cleaned up, especially after
4220 installing bundles, also from Alex Conrad.
4221
4222 · Tests now require at least ScriptTest 1.0.3.
4223
4224 0.7
4225
4226 · Fixed uninstallation on Windows
4227
4228 · Added pip search command.
4229
4230 · Tab-complete names of installed distributions for pip uninstall.
4231
4232 · Support tab-completion when there is a global-option before the sub‐
4233 command.
4234
4235 · Install header files in standard (scheme-default) location when
4236 installing outside a virtualenv. Install them to a slightly more con‐
4237 sistent non-standard location inside a virtualenv (since the standard
4238 location is a non-writable symlink to the global location).
4239
4240 · pip now logs to a central location by default (instead of creating
4241 pip-log.txt all over the place) and constantly overwrites the file in
4242 question. On Unix and macOS this is '$HOME/.pip/pip.log' and on Win‐
4243 dows it’s '%HOME%\\pip\\pip.log'. You are still able to override this
4244 location with the $PIP_LOG_FILE environment variable. For a complete
4245 (appended) logfile use the separate '--log' command line option.
4246
4247 · Fixed an issue with Git that left an editable package as a checkout
4248 of a remote branch, even if the default behaviour would have been
4249 fine, too.
4250
4251 · Fixed installing from a Git tag with older versions of Git.
4252
4253 · Expand “~” in logfile and download cache paths.
4254
4255 · Speed up installing from Mercurial repositories by cloning without
4256 updating the working copy multiple times.
4257
4258 · Fixed installing directly from directories (e.g. pip install
4259 path/to/dir/).
4260
4261 · Fixed installing editable packages with svn+ssh URLs.
4262
4263 · Don’t print unwanted debug information when running the freeze com‐
4264 mand.
4265
4266 · Create log file directory automatically. Thanks Alexandre Conrad.
4267
4268 · Make test suite easier to run successfully. Thanks Dave Abrahams.
4269
4270 · Fixed “pip install .” and “pip install ..”; better error for direc‐
4271 tory without setup.py. Thanks Alexandre Conrad.
4272
4273 · Support Debian/Ubuntu “dist-packages” in zip command. Thanks duckx.
4274
4275 · Fix relative –src folder. Thanks Simon Cross.
4276
4277 · Handle missing VCS with an error message. Thanks Alexandre Conrad.
4278
4279 · Added –no-download option to install; pairs with –no-install to sepa‐
4280 rate download and installation into two steps. Thanks Simon Cross.
4281
4282 · Fix uninstalling from requirements file containing -f, -i, or
4283 –extra-index-url.
4284
4285 · Leftover build directories are now removed. Thanks Alexandre Conrad.
4286
4287 0.6.3
4288
4289 · Fixed import error on Windows with regard to the backwards compati‐
4290 bility package
4291
4292 0.6.2
4293
4294 · Fixed uninstall when /tmp is on a different filesystem.
4295
4296 · Fixed uninstallation of distributions with namespace packages.
4297
4298 0.6.1
4299
4300 · Added support for the https and http-static schemes to the Mercurial
4301 and ftp scheme to the Bazaar backend.
4302
4303 · Fixed uninstallation of scripts installed with easy_install.
4304
4305 · Fixed an issue in the package finder that could result in an infinite
4306 loop while looking for links.
4307
4308 · Fixed issue with pip bundle and local files (which weren’t being
4309 copied into the bundle), from Whit Morriss.
4310
4311 0.6
4312
4313 · Add pip uninstall and uninstall-before upgrade (from Carl Meyer).
4314
4315 · Extended configurability with config files and environment variables.
4316
4317 · Allow packages to be upgraded, e.g., pip install Package==0.1 then
4318 pip install Package==0.2.
4319
4320 · Allow installing/upgrading to Package==dev (fix “Source version does
4321 not match target version” errors).
4322
4323 · Added command and option completion for bash and zsh.
4324
4325 · Extended integration with virtualenv by providing an option to auto‐
4326 matically use an active virtualenv and an option to warn if no active
4327 virtualenv is found.
4328
4329 · Fixed a bug with pip install –download and editable packages, where
4330 directories were being set with 0000 permissions, now defaults to
4331 755.
4332
4333 · Fixed uninstallation of easy_installed console_scripts.
4334
4335 · Fixed uninstallation on macOS Framework layout installs
4336
4337 · Fixed bug preventing uninstall of editables with source outside venv.
4338
4339 · Creates download cache directory if not existing.
4340
4341 0.5.1
4342
4343 · Fixed a couple little bugs, with git and with extensions.
4344
4345 0.5
4346
4347 · Added ability to override the default log file name (pip-log.txt)
4348 with the environmental variable $PIP_LOG_FILE.
4349
4350 · Made the freeze command print installed packages to stdout instead of
4351 writing them to a file. Use simple redirection (e.g. pip freeze >
4352 stable-req.txt) to get a file with requirements.
4353
4354 · Fixed problem with freezing editable packages from a Git repository.
4355
4356 · Added support for base URLs using <base href='...'> when parsing HTML
4357 pages.
4358
4359 · Fixed installing of non-editable packages from version control sys‐
4360 tems.
4361
4362 · Fixed issue with Bazaar’s bzr+ssh scheme.
4363
4364 · Added –download-dir option to the install command to retrieve package
4365 archives. If given an editable package it will create an archive of
4366 it.
4367
4368 · Added ability to pass local file and directory paths to --find-links,
4369 e.g. --find-links=file:///path/to/my/private/archive
4370
4371 · Reduced the amount of console log messages when fetching a page to
4372 find a distribution was problematic. The full messages can be found
4373 in pip-log.txt.
4374
4375 · Added --no-deps option to install ignore package dependencies
4376
4377 · Added --no-index option to ignore the package index (PyPI) temporar‐
4378 ily
4379
4380 · Fixed installing editable packages from Git branches.
4381
4382 · Fixes freezing of editable packages from Mercurial repositories.
4383
4384 · Fixed handling read-only attributes of build files, e.g. of Subver‐
4385 sion and Bazaar on Windows.
4386
4387 · When downloading a file from a redirect, use the redirected loca‐
4388 tion’s extension to guess the compression (happens specifically when
4389 redirecting to a bitbucket.org tip.gz file).
4390
4391 · Editable freeze URLs now always use revision hash/id rather than tip
4392 or branch names which could move.
4393
4394 · Fixed comparison of repo URLs so incidental differences such as pres‐
4395 ence/absence of final slashes or quoted/unquoted special characters
4396 don’t trigger “ignore/switch/wipe/backup” choice.
4397
4398 · Fixed handling of attempt to checkout editable install to a
4399 non-empty, non-repo directory.
4400
4401 0.4
4402
4403 · Make -e work better with local hg repositories
4404
4405 · Construct PyPI URLs the exact way easy_install constructs URLs (you
4406 might notice this if you use a custom index that is slash-sensitive).
4407
4408 · Improvements on Windows (from Ionel Maries Cristian).
4409
4410 · Fixed problem with not being able to install private git reposito‐
4411 ries.
4412
4413 · Make pip zip zip all its arguments, not just the first.
4414
4415 · Fix some filename issues on Windows.
4416
4417 · Allow the -i and --extra-index-url options in requirements files.
4418
4419 · Fix the way bundle components are unpacked and moved around, to make
4420 bundles work.
4421
4422 · Adds -s option to allow the access to the global site-packages if a
4423 virtualenv is to be created.
4424
4425 · Fixed support for Subversion 1.6.
4426
4427 0.3.1
4428
4429 · Improved virtualenv restart and various path/cleanup problems on
4430 win32.
4431
4432 · Fixed a regression with installing from svn repositories (when not
4433 using -e).
4434
4435 · Fixes when installing editable packages that put their source in a
4436 subdirectory (like src/).
4437
4438 · Improve pip -h
4439
4440 0.3
4441
4442 · Added support for editable packages created from Git, Mercurial and
4443 Bazaar repositories and ability to freeze them. Refactored support
4444 for version control systems.
4445
4446 · Do not use sys.exit() from inside the code, instead use a return.
4447 This will make it easier to invoke programmatically.
4448
4449 · Put the install record in Package.egg-info/installed-files.txt (pre‐
4450 viously they went in site-packages/install-record-Package.txt).
4451
4452 · Fix a problem with pip freeze not including -e svn+ when an svn
4453 structure is peculiar.
4454
4455 · Allow pip -E to work with a virtualenv that uses a different version
4456 of Python than the parent environment.
4457
4458 · Fixed Win32 virtualenv (-E) option.
4459
4460 · Search the links passed in with -f for packages.
4461
4462 · Detect zip files, even when the file doesn’t have a .zip extension
4463 and it is served with the wrong Content-Type.
4464
4465 · Installing editable from existing source now works, like pip install
4466 -e some/path/ will install the package in some/path/. Most impor‐
4467 tantly, anything that package requires will also be installed by pip.
4468
4469 · Add a --path option to pip un/zip, so you can avoid zipping files
4470 that are outside of where you expect.
4471
4472 · Add --simulate option to pip zip.
4473
4474 0.2.1
4475
4476 · Fixed small problem that prevented using pip.py without actually
4477 installing pip.
4478
4479 · Fixed --upgrade, which would download and appear to install upgraded
4480 packages, but actually just reinstall the existing package.
4481
4482 · Fixed Windows problem with putting the install record in the right
4483 place, and generating the pip script with Setuptools.
4484
4485 · Download links that include embedded spaces or other unsafe charac‐
4486 ters (those characters get %-encoded).
4487
4488 · Fixed use of URLs in requirement files, and problems with some blank
4489 lines.
4490
4491 · Turn some tar file errors into warnings.
4492
4493 0.2
4494
4495 · Renamed to pip, and to install you now do pip install PACKAGE
4496
4497 · Added command pip zip PACKAGE and pip unzip PACKAGE. This is partic‐
4498 ularly intended for Google App Engine to manage libraries to stay
4499 under the 1000-file limit.
4500
4501 · Some fixes to bundles, especially editable packages and when creating
4502 a bundle using unnamed packages (like just an svn repository without
4503 #egg=Package).
4504
4505 0.1.4
4506
4507 · Added an option --install-option to pass options to pass arguments to
4508 setup.py install
4509
4510 · .svn/ directories are no longer included in bundles, as these direc‐
4511 tories are specific to a version of svn – if you build a bundle on a
4512 system with svn 1.5, you can’t use the checkout on a system with svn
4513 1.4. Instead a file svn-checkout.txt is included that notes the
4514 original location and revision, and the command you can use to turn
4515 it back into an svn checkout. (Probably unpacking the bundle should,
4516 maybe optionally, recreate this information – but that is not cur‐
4517 rently implemented, and it would require network access.)
4518
4519 · Avoid ambiguities over project name case, where for instance MyPack‐
4520 age and mypackage would be considered different packages. This in
4521 particular caused problems on Macs, where MyPackage/ and mypackage/
4522 are the same directory.
4523
4524 · Added support for an environmental variable $PIP_DOWNLOAD_CACHE which
4525 will cache package downloads, so future installations won’t require
4526 large downloads. Network access is still required, but just some
4527 downloads will be avoided when using this.
4528
4529 0.1.3
4530
4531 · Always use svn checkout (not export) so that tag_svn_revision set‐
4532 tings give the revision of the package.
4533
4534 · Don’t update checkouts that came from .pybundle files.
4535
4536 0.1.2
4537
4538 · Improve error text when there are errors fetching HTML pages when
4539 seeking packages.
4540
4541 · Improve bundles: include empty directories, make them work with
4542 editable packages.
4543
4544 · If you use -E env and the environment env/ doesn’t exist, a new vir‐
4545 tual environment will be created.
4546
4547 · Fix dependency_links for finding packages.
4548
4549 0.1.1
4550
4551 · Fixed a NameError exception when running pip outside of a virtualenv
4552 environment.
4553
4554 · Added HTTP proxy support (from Prabhu Ramachandran)
4555
4556 · Fixed use of hashlib.md5 on python2.5+ (also from Prabhu Ramachan‐
4557 dran)
4558
4559 0.1
4560
4561 · Initial release
4562
4564 2008-2016, PyPA
4565
4566
4567
4568
45699.0 May 11, 2019 PIP(1)