Ich habe eine php-Datei, die ein Python-Skript aufruft
- $ret_val=exec("python3 test.py 2>&1", $output, $ret_var);
Ich verwende packages wie reportlab usw. Die packages habe ich auf einer lokalen Debian-VM installiert:
- python3 -m venv venv
- . venv/bin/activate
- pip install reportlab
Danach habe ich alle Dateien im Ordner ven/lib/python3.7/site-packages auf mein webhosting geladen. Soweit funktioniert alles super.
Nun benötige ich noch das numpy-package. Dort habei ich es genauso gemacht wie mit den anderen packages.
Jedoch bekomme ich hier die folgende Fehlermeldung:
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 formany reasons, often due to issues with your setup or how NumPy wasinstalled.We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user…ng-importerror.htmlPlease note and check the following: * The Python version is: Python3.7 from "/usr/bin/python3" * The NumPy version is: "1.21.6"and make sure that they are the versions you expect.Please carefully study the documentation linked above for further help.Original error was: No module named 'numpy.core._multiarray_umath'
Hat jemand von Euch numpy erfolgreich auf einem Webhosting am Laufen?
Oder hat jemand einen Tipp für mich, woran es liegen könnte bzw. woher ich die C-extionsion bekomme?
Danke im Voraus.