[MacPorts] #71327: py-numpy: Import error symbol not found in flat namespace '_ccopy$NEWLAPACK_' (was: NumPy: Import error symbol not found in flat namespace '_ccopy$NEWLAPACK_')

MacPorts noreply at macports.org
Mon Nov 18 15:41:32 UTC 2024


#71327: py-numpy: Import error symbol not found in flat namespace
'_ccopy$NEWLAPACK_'
------------------------+------------------------
  Reporter:  jbgoette   |      Owner:  reneeotten
      Type:  defect     |     Status:  accepted
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.10.4
Resolution:             |   Keywords:
      Port:  py3-numpy  |
------------------------+------------------------
Changes (by reneeotten):

 * owner:  (none) => reneeotten
 * status:  new => accepted
 * port:  py312-numpy => py3-numpy


Old description:

> I tried to install py312-pandas, which failed. The error pointed me to a
> failing NumPy import and when I import NumPy from within python3.12 I get
> the following error messages:
>
> Python 3.12.7 (main, Oct  5 2024, 01:39:55) [Clang 16.0.0
> (clang-1600.0.26.4)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numpy
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/__init__.py", line 149, in <module>
>     from . import lib
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/lib/__init__.py", line 23, in <module>
>     from . import index_tricks
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/lib/index_tricks.py", line 12, in <module>
>     import numpy.matrixlib as matrixlib
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/matrixlib/__init__.py", line 4, in <module>
>     from . import defmatrix
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/matrixlib/defmatrix.py", line 12, in <module>
>     from numpy.linalg import matrix_power
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/linalg/__init__.py", line 73, in <module>
>     from . import linalg
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/linalg/linalg.py", line 35, in <module>
>     from numpy.linalg import _umath_linalg
> ImportError:
> dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/numpy/linalg/_umath_linalg.cpython-312-darwin.so, 0x0002):
> symbol not found in flat namespace '_ccopy$NEWLAPACK_'
>
> py312-numoy itsefl install without errors. The same problem exists for
> py311-numoy and py313-numpy for me.

New description:

 I tried to install py312-pandas, which failed. The error pointed me to a
 failing NumPy import and when I import NumPy from within python3.12 I get
 the following error messages:

 {{{
 Python 3.12.7 (main, Oct  5 2024, 01:39:55) [Clang 16.0.0
 (clang-1600.0.26.4)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/__init__.py", line 149, in <module>
     from . import lib
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/lib/__init__.py", line 23, in <module>
     from . import index_tricks
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/lib/index_tricks.py", line 12, in <module>
     import numpy.matrixlib as matrixlib
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/matrixlib/__init__.py", line 4, in <module>
     from . import defmatrix
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/matrixlib/defmatrix.py", line 12, in <module>
     from numpy.linalg import matrix_power
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/linalg/__init__.py", line 73, in <module>
     from . import linalg
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/linalg/linalg.py", line 35, in <module>
     from numpy.linalg import _umath_linalg
 ImportError:
 dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/numpy/linalg/_umath_linalg.cpython-312-darwin.so, 0x0002):
 symbol not found in flat namespace '_ccopy$NEWLAPACK_'
 }}}

 py312-numoy itself install without errors. The same problem exists for
 py311-numoy and py313-numpy for me.

--

Comment:

 hi Jörg, not sure what's causing this... obviously I don't see this on my
 local system. Can you please provide a bit more information, for example,
 what macOS version is this, what architecture, etcetera? Also, did you
 install with the default variants or build from source locally (i.e., what
 does {{{port installed | grep numpy}}} show?)

-- 
Ticket URL: <https://trac.macports.org/ticket/71327#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list