I'm accustomed to pre-downloading packages using Pip, then copying them over to a target machine for deployment. With the newly introduced Python Wheels, I'm forced to "pip ... --no-use-wheel", as some of the downloaded packages are platform specific (I'm developing on OSX and deploying to Debian) and will not install on the target machine. Is there a way to download Wheels for target platforms (or platform independent)?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
The easiest way to achieve that is IMO to use a custom script.
You can access the whole of the PyPI index via the simple interface, if the package of interest offers one or more wheels, they will be listed at the same address +
/<package-name>
.For example: if you were to install
setuptools
all wheels would be listed at: https://pypi.python.org/simple/setuptools/In your script, remember to implement the recommended tag priority as specified by PEP-425. Essentially that boils down to download the most specific (as opposed to the most general) version of the package as this normally translate into performance advantages, with for example C extensions replacing pure python implementations of some algorithm.
The
pip download
command now has the--platform
argument, which you can use to specify the desired platform: