#66252 closed defect (fixed)

py310-scipy @1.9.3: _biasedurn.pyx:13:4: 'numpy/random.pxd' not found

Reported by: renzresearch Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: ventura Cc: adsche
Port: py-scipy

Description

I was installing py-scikit-image on Ventura. I got this:

Error: Failed to build py310-scipy: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py310-scipy/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port py-scikit-image failed

The main.log is attached.

Attachments (2)

main.log (21.6 KB) - added by renzresearch 17 months ago.
Log file
main.2.log (120.5 KB) - added by coolstars21 16 months ago.
Log file for py39-scipy

Download all attachments as: .zip

Change History (20)

Changed 17 months ago by renzresearch

Attachment: main.log added

Log file

comment:1 Changed 17 months ago by jmroot (Joshua Root)

Keywords: ventura added; Ventura scipy removed
Owner: set to michaelld
Port: py-scipy added; py310-scipy removed
Status: newassigned

comment:2 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: Failed to build py310-scipypy310-scipy @1.9.3: _biasedurn.pyx:13:4: 'numpy/random.pxd' not found

comment:3 Changed 16 months ago by michaelld (Michael Dickens)

has duplicate #66335

comment:4 Changed 16 months ago by michaelld (Michael Dickens)

For folks with this issue, what does the following return:

port contents py310-numpy | grep random | grep -v /tests/ | grep -v /_examples/ | grep -v \.so | grep -v /__pycache__/

Also: are you able to install py311-scipy? if it fails then attach the build log

comment:5 Changed 16 months ago by michaelld (Michael Dickens)

Ignore that last query ... I haven't committed those changes for py311-scipy yet ... requires some other Py311 ports. Basically wondering if this issue is limited to Py310 or does it impact other versions of SciPy?

comment:6 Changed 16 months ago by coolstars21

port contents py310-numpy | grep random | grep -v /tests/ | grep -v /_examples/ | grep -v \.so | grep -v /pycache/

/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/include/numpy/random/bitgen.h /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/core/include/numpy/random/distributions.h /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/init.pxd /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/init.py /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/init.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_bounded_integers.pxd /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_common.pxd /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_generator.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_mt19937.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_pcg64.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_philox.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_pickle.py /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_sfc64.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/bit_generator.pxd /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/bit_generator.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/c_distributions.pxd /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/lib/libnpyrandom.a /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/mtrand.pyi /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/setup.py

comment:7 Changed 16 months ago by coolstars21

I just tried to install py39-scipy and got an error as well. Log is attached.

Note that I have py27-scipy running, though.

Last edited 16 months ago by coolstars21 (previous) (diff)

Changed 16 months ago by coolstars21

Attachment: main.2.log added

Log file for py39-scipy

comment:8 Changed 16 months ago by michaelld (Michael Dickens)

Thanks @coolstars21 . Py39-scipy shows the same issue. The port contents py310-numpy looks correct to me. What does the following return:

python3.10 -c "import numpy ; print(numpy.__version__)"

comment:9 Changed 16 months ago by coolstars21

/opt/local/bin/python3.10 -c "import numpy ; print(numpy.version)"

1.23.5

comment:10 Changed 16 months ago by michaelld (Michael Dickens)

OK; that's good. What about python3.10 -c "import numpy ; print(numpy.version)"

comment:11 Changed 16 months ago by coolstars21

/opt/local/bin/python3.10 -c "import numpy ; print(numpy.version)"

<module 'numpy.version' from '/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/version.py'>

comment:12 Changed 16 months ago by michaelld (Michael Dickens)

OK that looks good too

comment:13 Changed 16 months ago by michaelld (Michael Dickens)

I'll note that the MP builders succeed with `py310-numpy` for all OSX >= 10.7 ... but that there is no macOS 13 builder up yet. It builds for me on my macOS 13.1-beta Intel computer:

% mp_host_info
macOS 13.1 22C5050e
Xcode 14.1 14B47b
% port -v installed py310-scipy
The following ports are currently installed:
  py310-scipy @1.9.3_0+gfortran+openblas (active) requested_variants='' platform='darwin 22' archs='x86_64' date='2022-11-17T18:14:48-0500'

I don't have a macOS 13 ARM64 computer up right now, but at least one log shows building for Intel.

comment:14 Changed 16 months ago by michaelld (Michael Dickens)

Comparing build logs (mine versus the one here), there are no real differences. Just for some reason it fails for folks here but it doesn't for me or the MP builders. So strange!

comment:15 Changed 16 months ago by adsche

I get this as well (macOS Ventura 13.0.1, xcode 14.1, ARM64 (M2), python 3.10.9+lto+optimizations, py310-numpy @1.23.5_0+gfortran+openblas)

Numpy does indeed not contain the 'missing'(?) random.pxd file:

port contents py310-numpy | grep pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/__init__.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/__init__.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_bounded_integers.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/_common.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/bit_generator.pxd
  /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/random/c_distributions.pxd

Possibly same issue in the scipy tracker, attributed to a 'wrong'(?) cython being used? https://github.com/scipy/scipy/issues/17552

Anything I can do to help debug this?

Last edited 16 months ago by adsche (previous) (diff)

comment:16 Changed 16 months ago by adsche

Ok, wow, indeed, it picked up the wrong cython. sudo port select cython cython310 fixed it for me (it was cython39 before which I did not install nor select manually).

However, does the port maybe have to be fixed to use the correct one? Otherwise it would require manual intervention to have py39-scipy and py310-scipy installed at the same time, correct?

comment:17 Changed 16 months ago by adsche

Cc: adsche added

comment:18 Changed 14 months ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

this has installed for me with no problems twice now on an M1 running Ventura.

As Michael notes it builds for him on Intel as well, I'm going to call this fixed, therefore, or perhaps it was being caused by people having sudo port select'ed an older cython.

 % port -v installed py310-scipy
The following ports are currently installed:
  py310-scipy @1.9.3_0+gfortran+openblas requested_variants='' platform='darwin 22' archs='arm64' date='2022-12-29T13:31:38-0800'
  py310-scipy @1.10.0_0+gfortran+openblas (active) requested_variants='' platform='darwin 22' archs='arm64' date='2023-02-05T19:26:39-0800'

please reopen with new info if ongoing issues.

Note: See TracTickets for help on using tickets.