Ich versuche mit Pandas zu arbeiten, welches als Abhängigkeit NumPy benötigt. Beim Versuch NumPy zu importieren gibt er jedoch folgenden Fehler aus:
Code: Alles auswählen
(venv) PS C:\Users\Gardinero\Documents\Projects\Statement_Automation\03_Engineering\Code_Files\Application> python main.py
Traceback (most recent call last):
File "C:\Users\Gardinero\Documents\Projects\Statement_Automation\03_Engineering\Code_Files\Application\main.py", line 24, in <module>
from app_classes.db import Database
File "C:\Users\Gardinero\Documents\Projects\Statement_Automation\03_Engineering\Code_Files\Application\app_classes\db.py", line 5, in <module>
import pandas as pd
File "C:\Users\Gardinero\Documents\Projects\Statement_Automation\03_Engineering\Code_Files\Application\Environm
ents\venv\lib\site-packages\pandas\__init__.py", line 16, in <module>
raise ImportError(
ImportError: Unable to import required dependencies:
numpy:
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/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.9 from "C:\Users\Gardinero\Documents\Projects\Statement_Automation\03_Engineering\Code_Files\Application\Environm
ents\venv\Scripts\python.exe"
* The NumPy version is: "1.22.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: Der Dateiname oder die Erweiterung ist zu lang.
- Ich nutze ein Virtual Environment
- Python 3.9.2
- NumPy 1.22.1
- PyCharm CE 2021.3 (übers Terminal kommt aber der selbe Fehler)
- Windows 10 Enterprise, 64 bit
Was ich bereits versucht habe:
- Der dll name, der denke ich importiert wird ist: 'libopenblas.EL2C6PLE4ZYW3ECEVIV3OXXGRN2NRFM2.gfortran-win_amd64.dll'
Ich kenne mich leider zu wenig mit dll files aus, habe mir aber gedacht, dass der filename dynamisch generiert ist und daher das file umbenannt zu 'libopenblas.dll', was dennoch zum selben Fehler geführt hat.
- Numpy und setuptools mit pip deinstallieren und im Anschluss neu installieren
- ein neues virtual environment aufsetzen
- Im Internet habe ich leider immer nur DLL import Fehler gefunden, wenn die Datei gar nicht zu finden ist, allerdings nicht, wenn der Dateiname oder die Erweiterung zu lang ist.
Auf dem Link in der Fehlermeldung, stehen leider nur sehr generische Angaben, wie "checken Sie Ihren Pfad, ob das zur Lösung führt". Leider weiß ich hier aber nicht, worauf ich achten soll.
Hat jemand ggf. mal einen ähnlichen Fehler gehabt, oder hat eine Idee, was ich noch versuchen könnte?
Ich bin für jede Hilfe sehr dankbar!
Beste Grüße
Gardinero