Questions tagged [python-wheel]

​​​​​​​​​​​​​​​​​​​​A wheel is a ZIP-like archive format for Python packages with the .whl extension.

Wheels were introduced to Python with PEP 427 to simplify distribution installation. It replaces the egg format.

Useful Links:

  1. PEP 376 Database of Installed Python Distributions infrastructure Wheels are based on
  2. PEP 427 Introduction of the Wheel format
  3. Wheel package index
883 questions
10
votes
1 answer

Pip, wheel and console_scripts

I'm running into the following problem with python whl packages: I have a package with a single entrypoint defined in my setup.py. When I run pip install ., it installs the package AND the entry point wrapper properly. When I run python setup.py…
A.J.Rouvoet
  • 1,203
  • 1
  • 14
  • 29
10
votes
1 answer

Install package dependencies with setup.py and wheels

We're using an internally hosted PyPI server (devpi-server) so that we can host binary wheels of huge packages that take a long time to install from source like scipy, matplotlib, etc. Installing these packages with pip install scipy works perfectly…
onlynone
  • 7,602
  • 3
  • 31
  • 50
10
votes
1 answer

Does python's new 'pip wheel' have any support for building wheels for the dependencies listed in tests_requires?

I use setuptools 'tests_require' to specify dependencies required for testing my package. tests_require - http://pythonhosted.org/distribute/setuptools.html#new-and-changed-setup-keywords I have begun using wheel…
Atlas1j
  • 2,442
  • 3
  • 27
  • 35
9
votes
2 answers

Create Python C extension using MacOS 10.15 (Catalina) that is backwards compatible (MacOS10.9+)

How can I create a Python C extension wheel for MacOS that is backwards compatible (MacOS 10.9+) using MacOS 10.15? This is what I have so far: export MACOSX_DEPLOYMENT_TARGET=10.9 python -m pip wheel . -w wheels --no-deps python -m pip install…
AstrOne
  • 3,569
  • 7
  • 32
  • 54
9
votes
2 answers

Where are stored wheels .whl cached files?

$ python3 -m venv ~/venvs/vtest $ source ~/venvs/vtest/bin/activate (vtest) $ pip install numpy Collecting numpy Cache entry deserialization failed, entry ignored Using cached…
user3313834
  • 7,327
  • 12
  • 56
  • 99
9
votes
2 answers

How do I add a Python tag to the bdist_wheel command using setuptools?

Let's say I have a simple library which uses setuptools for packaging and distributing. The library in this case also requires a minimum version of Python 3.6, meaning my setup.py would be something like as follows: from setuptools import setup,…
Arnav Borborah
  • 11,357
  • 8
  • 43
  • 88
9
votes
2 answers

How to pip install with wheel specifying extras?

I have a package with extras that I can typically install with the following command. pip install package[extras] However, I can also install the same package via wheels, specifying some wheel URL like the following. pip install package_url.whl Is…
richliaw
  • 1,925
  • 16
  • 14
9
votes
1 answer

How do I build multiple wheel files from a single setup.py?

In my project, I have a single setup.py file that builds multiple modules using the following namespace pattern: from setuptools import setup setup(name="testmoduleserver", packages=["testmodule.server","testmodule.shared"], …
Greg Fuller
  • 93
  • 1
  • 4
9
votes
1 answer

Pip ignores dependency_links whlie installing package from wheel if dependency exists on PyPI

I am packaging my own Python package. I use setuptools and wheel for bundling it and pip for installing (both in develop mode and from test PyPI repository). Every pip command for installing packages is used with --process-dependency-links here. I…
krautcat
  • 91
  • 4
9
votes
1 answer

What needs to be in a setup.py to create a wheel?

I have a Python project prj that we can describe as a collection of folders and a requirements.txt file: [prj/fold1, prj/fold2,..., prj/foldN, prj/requirements.txt] I want to package this project so that it can be easily installed on other…
Donbeo
  • 17,067
  • 37
  • 114
  • 188
9
votes
3 answers

Python How can I get the version number from a .whl file

Because of some custom logging I would like to get the version number from a wheel file. I could of course just parse the filename, but my guess is there would be a better way to do this.
Johan Vergeer
  • 5,208
  • 10
  • 48
  • 105
9
votes
3 answers

Why can't `virtualenv` find `pkg_resources`?

I'm trying to use virtualenv in Ubuntu to install a local virtual Python environment. When I run the shell command: $ virtualenv ./virt_python It throws an exception that it can't import pkg_resources. But when I open a Python shell and from…
Rich
  • 12,068
  • 9
  • 62
  • 94
8
votes
3 answers

DEPRECATION Error : 'wheel' package is not installed

We are getting following deprecation error while trying to deploy python code. We are using python 3.7.12. We have tried to install wheel package as the part of deployment with no luck. Do we need to mention any specific version of wheel -- Would…
Partha
  • 413
  • 2
  • 5
  • 16
8
votes
5 answers

Installing LXML, facing a "legacy-install-failure" error

Trying to install lxml on Python 311. Faced with this error. PS C:\Users\chharlie\Desktop\code> pip install lxml Collecting lxml Using cached lxml-4.9.1.tar.gz (3.4 MB) Preparing metadata (setup.py) ... done Building wheels for collected…
siovjio spvjs
  • 81
  • 1
  • 1
  • 2
8
votes
3 answers

Can't install numpy on python 3.10

I'm quite new to machine learning and when I tried to install numpy and this happended Can you guys help me fix this. I'm using python 3.10.0 ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which…
Johnny
  • 81
  • 1
  • 1
  • 2