Install python wheel file without using pip

I’m assuming you have internet access, but you don’t have a working pip installation. Download the pip wheel: wget https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl To find the url of a release in the first place, you can get the index json endpoint. For example: $ curl -s https://pypi.org/pypi/pip/json | jq “.urls[0].url” “https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl” For users not scripting this but just … Read more

‘pip setup.py bdist_wheel’ no longer builds forced non-pure wheels

I’ve just run into this issue myself with Python v2.7 and wheel v0.29.0 on Windows 7 x64, where I build a Python package with some pre-compiled extensions (complicated VisualStudio setup with SWIG and external DLLs). After examining the source code I have found that overriding Distribution.has_ext_modules works (automatically includes platform name and ABI tag): from … Read more

Easy_install cache downloaded files

Update 13 years later: easy_install was removed from Python in January 2021. The python package manager is pip, it caches downloaded packages. pip (http://pypi.python.org/pypi/pip/) is a drop-in replacement for the easy_install tool and can do that. Just run easy_install pip and set an environment variable PIP_DOWNLOAD_CACHE to the path you want pip to store the … Read more

module ‘pip’ has no attribute ‘pep425tags’

To print the list of compatible tags with current versions of pip : $ path/to/pythonX.Y -m pip debug –verbose The pip debug subcommand is available since v19.2 (July 2019). To get the list of compatible tags from Python code, I recommend using the packaging library and its packaging.tags.sys_tags() function: import packaging.tags tags = packaging.tags.sys_tags() print(‘\n’.join([f'{tag.interpreter}-{tag.abi}-{tag.platform}’ … Read more

How do I install Python libraries in wheel format?

You want to install a downloaded wheel (.whl) file on Python under Windows? Install pip on your Python(s) on Windows (on Python 3.4+ it is already included) Upgrade pip if necessary (on the command line) pip install -U pip Install a local wheel file using pip (on the command line) pip install –no-index –find-links=LocalPathToWheelFile PackageName … Read more

How do you add additional files to a wheel?

Have you tried using package_data in your setup.py? MANIFEST.in seems targetted for python versions <= 2.6, I’m not sure if higher versions even look at it. After exploring https://github.com/pypa/sampleproject, their MANIFEST.in says: # If using Python 2.6 or less, then have to include package data, even though # it’s already declared in setup.py include sample/*.dat … Read more