error because of NumPy import which does not seem to be possible
Python.Runtime.PythonException: Unable to import required dependencies:
numpy: 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.
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\pandas\__init__.py", line 32, in <module>
raise ImportError(
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\types.py", line 9, in <module>
import pandas as pd
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\constants.py", line 10, in <module>
from delta_barth.types import DualDict, HttpContentHeaders
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\management.py", line 8, in <module>
from delta_barth.constants import HTTP_BASE_CONTENT_HEADERS
at Python.Runtime.PythonException.ThrowLastAsClrException()
at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
at Python.Runtime.PyModule.Import(String name)
at Python.Runtime.Py.Import(String name)
at dopt.DeltaBarth.Plugin..ctor(String runtimePath)
error because of NumPy import which does not seem to be possible
```
Python.Runtime.PythonException: Unable to import required dependencies:
numpy: 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.
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\pandas\__init__.py", line 32, in <module>
raise ImportError(
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\types.py", line 9, in <module>
import pandas as pd
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\constants.py", line 10, in <module>
from delta_barth.types import DualDict, HttpContentHeaders
File "C:\Program Files (x86)\DELECO\ERP Server\extern\dopt\python\Lib\site-packages\delta_barth\management.py", line 8, in <module>
from delta_barth.constants import HTTP_BASE_CONTENT_HEADERS
at Python.Runtime.PythonException.ThrowLastAsClrException()
at Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference)
at Python.Runtime.PyModule.Import(String name)
at Python.Runtime.Py.Import(String name)
at dopt.DeltaBarth.Plugin..ctor(String runtimePath)
```
foefl
added the bug label 2025-05-28 13:31:27 +00:00
foefl
self-assigned this 2025-05-28 13:31:27 +00:00
foefl
added this to the bug fixes project 2025-05-28 13:31:27 +00:00
Betriebssystem: Microsoft Windows Server 2022 Standard
Runtime: .NET 8.0.15
Prozessor: Intel(R) Xeon(R) CPU E5-2637 v4 @ 3.50GHz
Arbeitsspeicher: 7 GB
system specs for production system:
- Betriebssystem: Microsoft Windows Server 2022 Standard
- Runtime: .NET 8.0.15
- Prozessor: Intel(R) Xeon(R) CPU E5-2637 v4 @ 3.50GHz
- Arbeitsspeicher: 7 GB
Delta Barth even tried to make their own small plugin with "pythonnet" --> same errors: working on local system, not test system
error message related to NumPy:
DLL load failed while importing _multiarray_umath
*state 16.06.2025*
- local execution working, on test system not
- Delta Barth even tried to make their own small plugin with "pythonnet" --> same errors: working on local system, not test system
error message related to NumPy:
`DLL load failed while importing _multiarray_umath`
*update on 18.06.2025*
Plugin is now working. Latest MS Visual C++ Redist package had to be installed on the system: [https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 )
Delta Barth does not want to install runtimes on their customers' servers.The problem can be fixed by placing the VC-Runtime DLL in the numpy.lib folder, because this is how Python loads external linked native DLL dependencies on Windows.
It is no valid option because there is no clear limit on how many times this DLL needs to be copied in the future, especially for other projects. There is always a risk that a possible import error is missed and the program does not work properly at runtime. Therefore it seems better to enable the Python interpreter to load the needed dependencies from the system's search path.
Delta Barth does not want to install runtimes on their customers' servers.The problem can be fixed by placing the VC-Runtime DLL in the `numpy.lib` folder, because this is how Python loads external linked native DLL dependencies on Windows.
It is no valid option because there is no clear limit on how many times this DLL needs to be copied in the future, especially for other projects. There is always a risk that a possible import error is missed and the program does not work properly at runtime. Therefore it seems better to enable the Python interpreter to load the needed dependencies from the system's search path.
For more information see the related issue for the base C#-Lib: dopt-SharpPython/dopt-SharpPython#9
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
error because of NumPy import which does not seem to be possible
currently digging into this topic with Delta Barth:
system specs for production system:
state 16.06.2025
error message related to NumPy:
DLL load failed while importing _multiarray_umathupdate on 18.06.2025
Plugin is now working. Latest MS Visual C++ Redist package had to be installed on the system: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
Delta Barth does not want to install runtimes on their customers' servers.The problem can be fixed by placing the VC-Runtime DLL in the
numpy.libfolder, because this is how Python loads external linked native DLL dependencies on Windows.It is no valid option because there is no clear limit on how many times this DLL needs to be copied in the future, especially for other projects. There is always a risk that a possible import error is missed and the program does not work properly at runtime. Therefore it seems better to enable the Python interpreter to load the needed dependencies from the system's search path.
For more information see the related issue for the base C#-Lib: dopt-SharpPython/dopt-SharpPython#9
Feedback on 27.06.25: The import is now working without copying DLLs to NumPy's lib folder.