1========== 2Quickstart 3========== 4 5First, :doc:`install pip <installing>`. 6 7Install a package from `PyPI`_: 8 9.. tab:: Unix/macOS 10 11 .. code-block:: console 12 13 $ python -m pip install SomePackage 14 [...] 15 Successfully installed SomePackage 16 17.. tab:: Windows 18 19 .. code-block:: console 20 21 C:\> py -m pip install SomePackage 22 [...] 23 Successfully installed SomePackage 24 25 26Install a package that's already been downloaded from `PyPI`_ or 27obtained from elsewhere. This is useful if the target machine does not have a 28network connection: 29 30.. tab:: Unix/macOS 31 32 .. code-block:: console 33 34 $ python -m pip install SomePackage-1.0-py2.py3-none-any.whl 35 [...] 36 Successfully installed SomePackage 37 38.. tab:: Windows 39 40 .. code-block:: console 41 42 C:\> py -m pip install SomePackage-1.0-py2.py3-none-any.whl 43 [...] 44 Successfully installed SomePackage 45 46Show what files were installed: 47 48.. tab:: Unix/macOS 49 50 .. code-block:: console 51 52 $ python -m pip show --files SomePackage 53 Name: SomePackage 54 Version: 1.0 55 Location: /my/env/lib/pythonx.x/site-packages 56 Files: 57 ../somepackage/__init__.py 58 [...] 59 60.. tab:: Windows 61 62 .. code-block:: console 63 64 C:\> py -m pip show --files SomePackage 65 Name: SomePackage 66 Version: 1.0 67 Location: /my/env/lib/pythonx.x/site-packages 68 Files: 69 ../somepackage/__init__.py 70 [...] 71 72List what packages are outdated: 73 74.. tab:: Unix/macOS 75 76 .. code-block:: console 77 78 $ python -m pip list --outdated 79 SomePackage (Current: 1.0 Latest: 2.0) 80 81.. tab:: Windows 82 83 .. code-block:: console 84 85 C:\> py -m pip list --outdated 86 SomePackage (Current: 1.0 Latest: 2.0) 87 88Upgrade a package: 89 90.. tab:: Unix/macOS 91 92 .. code-block:: console 93 94 $ python -m pip install --upgrade SomePackage 95 [...] 96 Found existing installation: SomePackage 1.0 97 Uninstalling SomePackage: 98 Successfully uninstalled SomePackage 99 Running setup.py install for SomePackage 100 Successfully installed SomePackage 101 102.. tab:: Windows 103 104 .. code-block:: console 105 106 C:\> py -m pip install --upgrade SomePackage 107 [...] 108 Found existing installation: SomePackage 1.0 109 Uninstalling SomePackage: 110 Successfully uninstalled SomePackage 111 Running setup.py install for SomePackage 112 Successfully installed SomePackage 113 114Uninstall a package: 115 116.. tab:: Unix/macOS 117 118 .. code-block:: console 119 120 $ python -m pip uninstall SomePackage 121 Uninstalling SomePackage: 122 /my/env/lib/pythonx.x/site-packages/somepackage 123 Proceed (y/n)? y 124 Successfully uninstalled SomePackage 125 126.. tab:: Windows 127 128 .. code-block:: console 129 130 C:\> py -m pip uninstall SomePackage 131 Uninstalling SomePackage: 132 /my/env/lib/pythonx.x/site-packages/somepackage 133 Proceed (y/n)? y 134 Successfully uninstalled SomePackage 135 136.. _PyPI: https://pypi.org/ 137