Import Numpy scheiterte, nachdem er MacOS auf 15,4 aktualisiert hattePython

Python-Programme
Anonymous
 Import Numpy scheiterte, nachdem er MacOS auf 15,4 aktualisiert hatte

Post by Anonymous »

Nach dem Upgrade von MacOS auf 15,4. Der Import ist fehlgeschlagen:
ist aufgetreten: Importeurror
Fehler importieren Numpy: Sie sollten nicht versuchen, Numpy aus
seinem Quellverzeichnis zu importieren. Bitte beenden Sie den Numpy Source Tree und relaunch
Ihr Python -Interpreter von dort. < /p>
Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
ImportError: dlopen(/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /opt/miniconda3/envs/ho/lib/libopenblas.0.dylib
Reason: tried: '/opt/miniconda3/envs/ho/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file, not in dyld cache)

During handling of the above exception, another exception occurred:

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubles ... error.html

Please note and check the following:

* The Python version is: Python3.12 from "/opt/miniconda3/envs/ho/bin/python"
* The NumPy version is: "2.0.0"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: dlopen(/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /opt/miniconda3/envs/ho/lib/libopenblas.0.dylib
Reason: tried: '/opt/miniconda3/envs/ho/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/lib/python3.12/site-packages/numpy/_core/../../../../libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/opt/miniconda3/envs/ho/bin/../lib/libgfortran.5.dylib' (duplicate LC_RPATH '@loader_path'), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file, not in dyld cache)

The above exception was the direct cause of the following exception:

File "/Users/yf/Library/CloudStorage/OneDrive-Personal/Documents/Projects/hohoho/playground.py", line 1, in
import numpy as np
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
< /code>
Alles war gestern in Ordnung.
Die Umgebung wird von Miniconda erstellt. Python ist 3.12.4, Numpy ist 2.0.0 < /p>
Ich habe alle Möglichkeiten ausprobiert, kann aber die Ausnahme nicht lösen: < /p>

[*] Löschen und neu erstellen Sie die Umgebung, die gleiche Paketsicherung in Yaml -Datei vor der Umgebung installieren. Pakete. < /li>
Suchen und löschen Sie den Numpy -Pfad im sys.path vor import: Pyinstaller zuvor, der vor dem Upgrade des Betriebssystems gut funktioniert hat, aber jetzt nicht ausgeführt werden kann und den gleichen Fehler melden kann. /> Die zuvor OS-Version ist 15.3 < /li>
MacBook Pro M1 < /li>
Upgrade auf Numpy 2.2.4, aber nicht das Problem lösen: Numpy 2.0.0-py312HB544834_0-> 2.2.4-py312H7C1F314_0 < /li> < /> < /> < /> < /> < /> < /> < /> < />

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post