Opened 7 months ago

Closed 5 months ago

#68513 closed defect (fixed)

py39-scipy @1.10.1_0+gfortran+openblas: numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found

Reported by: artbotterell (Art Botterell) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: sonoma Cc: mkuron (Michael Kuron), cooljeanius (Eric Gallager)
Port: py39-scipy

Description

First failed in course of installing gnuradio on M2 with Xcode 15.0.1 and a fresh install of MacPorts 2.8.1. Same problem on a fresh install of Sonoma 14.0 on Intel with a fresh install of MacPorts 2.8.1. Log excerpt follows:

:info:build Traceback (most recent call last):
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/setup.py", line 533, in <module>
:info:build     setup_package()
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/setup.py", line 529, in setup_package
:info:build     setup(**metadata)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/numpy/distutils/core.py", line 135, in setup
:info:build     config = configuration()
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/setup.py", line 431, in configuration
:info:build     raise NotFoundError(msg)
:info:build numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
:info:build To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
:info:build See site.cfg.example in the Scipy source directory and
:info:build https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-scipy/py39-scipy/work/scipy-1.10.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 setup.py --no-user-cfg build -j6 
:info:build Exit code: 1
:error:build Failed to build py39-scipy: command execution failed
:debug:build Error code: CHILDSTATUS 6049 1
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Change History (11)

comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sonoma added
Owner: set to michaelld
Port: py39-scipy added
Status: newassigned
Summary: py39-scipy @1.10.1_0+gfortran+openblas.darwin not building on macOS 15.0 (Sonoma) both Intel and Apple Siliconpy39-scipy @1.10.1_0+gfortran+openblas: numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found

comment:2 Changed 7 months ago by RivetBenoit (Benoit Rivet)

Possible duplicate.

I stumbled upon he same bug trying to install py311-scipy+gfortran+openblas. The error "No BLAS/LAPACK libraries found" was due to libopenblas.dylib having duplicate LC_RPATH's as discussed in #68329 There is no reason why there would be any difference between py39-scipy+gfortran+openblas and py311-scipy+gfortran+openblas.

An easy workaround : install py39-scipy+gfortran+mkl (this requires reinstalling py39-numpy using mkl instead of openblas).

comment:3 Changed 7 months ago by arensj123

I'm having the same problem with GQRX radio so I will try the 'easy workaround' and see if I can come up with something different. I had to manually install the full Xcode and openBLAS +native. I'll paste some logs here if I get any.

comment:4 Changed 7 months ago by arensj123

Last edited 7 months ago by arensj123 (previous) (diff)

comment:5 Changed 7 months ago by arensj123

---> Attempting to fetch py39-scipy-1.10.1_0+gfortran+openblas.darwin_23.arm64.tbz2 from https://packages.macports.org/py39-scipy ---> Attempting to fetch py39-scipy-1.10.1_0+gfortran+openblas.darwin_23.arm64.tbz2 from http://mirror.fcix.net/macports/packages/py39-scipy ---> Attempting to fetch py39-scipy-1.10.1_0+gfortran+openblas.darwin_23.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/py39-scipy

If I go to any of these repository URLs, darwin_23.arm64 is not there. It onlygoes to darwin_22.arm64 M2 Macbook Air, 16GB ram.

$ sudo port uninstall --follow-dependents python39 and reinstalled python39. Same think, missing darwin_23.arm64 version of py39-scipy. Just going to wait I guess and try installing CubicSDR instead while I wait.

Last edited 7 months ago by arensj123 (previous) (diff)

comment:6 Changed 6 months ago by mkuron (Michael Kuron)

Cc: mkuron added

comment:7 Changed 6 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:8 Changed 5 months ago by picree

Confirming problem still exists. py39-scipy fails to build. Repositories not yet updated with darwin_23.arm64. Trying to build on Mac M1 for gnuradio. Any update?

comment:9 Changed 5 months ago by kencu (Ken)

I have the fixed openblas, so no dupicate RPATH errors, but it still won't build (MacOS 14.2.1 arm64):

first error I see is:

Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 100, in process_pyx
    r = subprocess.call(['cython'] + flags + ["-o", tofile, fromfile], cwd=cwd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 349, in call
Processing scipy/linalg/cython_blas.pyx
    with Popen(*popenargs, **kwargs) as p:
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cython'

so I did this simple fix:

% sudo port select cython cython39 

and then after that, the next error is:

Error compiling Cython file:
------------------------------------------------------------
...

    if with_signature:
        signature = "int (double *, npy_intp, double *, npy_intp, void *)"

    try:
        capsule = PyCapsule_New(<void *>_filter1d, signature, _destructor)
                                                              ^
------------------------------------------------------------

_cytest.pyx:45:62: Cannot assign type 'void (object) except *' to 'PyCapsule_Destructor'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (object) except *'.
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 317, in <module>
    main()
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 313, in main
    find_process_files(root_dir)
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 302, in find_process_files
    for result in pool.imap_unordered(lambda args: process(*args), jobs):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 870, in next
    raise value
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 302, in <lambda>
    for result in pool.imap_unordered(lambda args: process(*args), jobs):
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 236, in process
    processor_function(fromfile, tofile, cwd=path)
  File "/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_python_py-scipy/py39-scipy/work/scipy-1.10.1/tools/cythonize.py", line 102, in process_pyx
    raise Exception('Cython failed')
Exception: Cython failed

comment:10 Changed 5 months ago by kencu (Ken)

which I think is this issue https://github.com/scipy/scipy/issues/17234

apparently already fixed by this https://github.com/scipy/scipy/pull/18242

comment:11 Changed 5 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

The issue originally reported here appears to be fixed, and there's a separate ticket for the cython error.

Note: See TracTickets for help on using tickets.