Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Fix version of wheel to support Python 3.10 #18389

Merged
merged 1 commit into from
Feb 10, 2021

Conversation

frenzymadness
Copy link
Contributor

The latest version of numpy is not installable from source code with Python 3.10. The reason is a bug (incompatibility) in the older versions of wheel package. For more info see this issue: pypa/wheel#354

The problem is already fixed in the latest wheel release (0.36.2).
What happens when you try to install the latest numpy from the master branch with Python 3.10:

pip install .
Processing /home/lbalhar/Software/numpy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
… more than 2000 lines of output …
  AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 'linux_x86_64')

With this patch it works like a charm:

pip install .
Processing /home/lbalhar/Software/numpy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (PEP 517) ... done
  Created wheel for numpy: filename=numpy-1.21.0.dev0+722.gf6a71feac-cp310-cp310-linux_x86_64.whl size=19243966 sha256=02a8e24b3642ed0f5ae6d90984bb3f142a3f0089d0bd40d855ea644bf9f9d26e
  Stored in directory: /tmp/pip-ephem-wheel-cache-m_vxju0i/wheels/44/94/c3/357b79921baf29908a3c5fdcb200e26e772f557fb67941dcfc
Successfully built numpy
Installing collected packages: numpy
Successfully installed numpy-1.21.0.dev0+722.gf6a71feac

pip list
Package    Version
---------- --------------------------
Cython     0.29.21
numpy      1.21.0.dev0+722.gf6a71feac
pip        21.0.1
setuptools 53.0.0
wheel      0.36.2

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, if CI doesn't expose any backward-incompatibilities.

@charris charris changed the title Fix version of wheel to support Python 3.10 MAINT: Fix version of wheel to support Python 3.10 Feb 10, 2021
@charris charris merged commit 1900913 into numpy:master Feb 10, 2021
@charris
Copy link
Member

charris commented Feb 10, 2021

Thanks @frenzymadness .

@frenzymadness frenzymadness deleted the wheel branch February 16, 2021 07:41
@pllim
Copy link
Contributor

pllim commented Apr 14, 2021

Hello. Which Numpy version will this patch be in? Thanks!

@charris
Copy link
Member

charris commented Apr 14, 2021

1.21.x will be the first to support Python 3.10 but we won't release wheels for it until 3.10.0 is released.

@pllim pllim mentioned this pull request Apr 14, 2021
2 tasks
@frenzymadness
Copy link
Contributor Author

Not releasing wheels before the final version of Python is out is okay (even it makes every installation much longer) but this fix is important also for installing from the sources. Right now, the installation from the source code fails unless you use pip install --no-use-pep517 numpy.

@jrd
Copy link

jrd commented Aug 5, 2021

Python 3.10 rc1 is out (ABI is frozen), so it’s reasonable to make wheels now, no?

@charris
Copy link
Member

charris commented Aug 5, 2021

Python 3.10 rc1 actually broke some things.

@jrd
Copy link

jrd commented Aug 6, 2021

Yes I just saw that (with power function)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants