DevHeads.net

Unable to install numpy with pip in python3.8

Hello,

Now that python3.8 has landed, I am trying to fix the packages that
don't build with it. For a few of these, I need to set up a virtual
environment with numpy in it. However, when I try to install numpy using
pip in the virtual env, it fails:

$ sudo dnf builddep python3-numpy

$ pew new -p /usr/bin/python3.8 numpy_test
$ pip install numpy

This fails with a long list of errors (attached). Numpy installs on
python3.7 just fine. Would someone be able to point out what I'm doing
wrong here? Not being able to install numpy in the virtual env is making
it a bit hard to debug package issues with python 3.8 and file issues
upstream. They're not always happy with the mock build output.

Comments

Re: Unable to install numpy with pip in python3.8

By Jos de Kloe at 08/22/2019 - 01:53

Hi,

this seems to indicate that there is an incompatibility in how numpy
calls cython macros.

On 8/22/19 12:38 AM, Ankur Sinha wrote:
Actually, there already is a bug report on cython here:
<a href="https://github.com/cython/cython/issues/2938" title="https://github.com/cython/cython/issues/2938">https://github.com/cython/cython/issues/2938</a>
discussing this incompatibility.

It means that the c code needs to be regenerated from the numpy pyx
cython files before it will work, so you would need to use the latest
numpy version from git.

This is also mentioned in this numpy issue 3 days ago:
<a href="https://github.com/numpy/numpy/issues/13927" title="https://github.com/numpy/numpy/issues/13927">https://github.com/numpy/numpy/issues/13927</a>

Which states:
"Closing, in summary for python3.8 you must build from a git checkout
until we release official 3.8 wheels/tarballs."

It won't work for pip builds yet.

Re: Unable to install numpy with pip in python3.8

By Ankur Sinha at 08/22/2019 - 05:06

On Thu, Aug 22, 2019 07:53:19 +0200, Jos de Kloe wrote:
Ugh! Thanks for that Jos. I'll go build it from git.