|
2 | 2 | Installing Packages |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Page Status: Incomplete |
6 | | -:Last Reviewed: 2014-12-24 |
| 5 | +:Page Status: Complete |
| 6 | +:Last Reviewed: 2015-09-09 |
7 | 7 |
|
8 | 8 | This section covers the basics of how to install Python :term:`packages |
9 | 9 | <Distribution Package>`. |
@@ -192,46 +192,32 @@ In this case, this means to install any version "==1.4.*" version that's also |
192 | 192 | ">=1.4.2". |
193 | 193 |
|
194 | 194 |
|
195 | | -Upgrading packages |
196 | | -================== |
197 | | - |
198 | | -Upgrade an already installed `SomeProject` to the latest from PyPI. |
199 | | - |
200 | | -:: |
201 | | - |
202 | | - pip install --upgrade SomeProject |
203 | | - |
204 | | - |
205 | | -Installing Cached Wheels |
206 | | -======================== |
| 195 | +Source Distributions vs Wheels |
| 196 | +============================== |
207 | 197 |
|
208 | | -:term:`Wheel` is a pre-built :term:`distribution <Distribution Package>` format that |
209 | | -provides faster installation compared to :term:`Source Distributions (sdist) |
210 | | -<Source Distribution (or "sdist")>`, especially when a project contains compiled |
211 | | -extensions. |
| 198 | +:ref:`pip` can install from either :term:`Source Distributions (sdist) <Source |
| 199 | +Distribution (or "sdist")>` or :term:`Wheels <Wheel>`, but if both are present |
| 200 | +on PyPI, pip will prefer the :term:`wheel <Wheel>`. |
212 | 201 |
|
213 | | -As of v1.5, :ref:`pip` prefers :term:`wheels <Wheel>` over :term:`sdists <Source |
214 | | -Distribution (or "sdist")>` when searching indexes. |
| 202 | +:term:`Wheels <Wheel>` are a pre-built :term:`distribution <Distribution |
| 203 | +Package>` format that provides faster installation compared to :term:`Source |
| 204 | +Distributions (sdist) <Source Distribution (or "sdist")>`, especially when a |
| 205 | +project contains compiled extensions. |
215 | 206 |
|
216 | | -Although wheels are `becoming more common <http://pythonwheels.com>`_ on |
217 | | -:term:`PyPI <Python Package Index (PyPI)>`, if you want all of your dependencies |
218 | | -converted to wheel, do the following (assuming you're using a :ref:`Requirements |
219 | | -File <pip:Requirements Files>`): |
| 207 | +If :ref:`pip` does not find a wheel to install, it will locally build a wheel |
| 208 | +and cache it for future installs, instead of rebuilding the source distribution |
| 209 | +in the future. |
220 | 210 |
|
221 | | -:: |
222 | 211 |
|
223 | | - pip wheel --wheel-dir=/local/wheels -r requirements.txt |
| 212 | +Upgrading packages |
| 213 | +================== |
224 | 214 |
|
225 | | -And then to install those requirements just using your local directory of wheels |
226 | | -(and not from PyPI): |
| 215 | +Upgrade an already installed `SomeProject` to the latest from PyPI. |
227 | 216 |
|
228 | 217 | :: |
229 | 218 |
|
230 | | - pip install --no-index --find-links=/local/wheels -r requirements.txt |
231 | | - |
| 219 | + pip install --upgrade SomeProject |
232 | 220 |
|
233 | | -:term:`Wheel` is intended to replace :term:`Eggs <Egg>`. For a detailed |
234 | | -comparison, see :ref:`Wheel vs Egg`. |
235 | 221 |
|
236 | 222 |
|
237 | 223 | Installing to the User Site |
|
0 commit comments