Am observing "DLL LOAD FAILED" error message while running my python file as a exe file in a server where Python or internet connect is not available. My other .exe files are working, this file containing IBM DB module is the only one having issues.
When I run this same .exe file in my local machine (laptop) - its Working, but in Server - its not working.
Below is the command I used to convert exe file:
pyinstaller -y --additional-hooks-dir=. --hidden-import ibm_db_sa.ibm_db --hidden-import ibm_db_dbi --hidden-import ibm_db --add-binary C:\Python\Python37\Lib\site-packages\ibm_db_dlls\ibm_db.dll;.\ibm_db_dlls --onefile mypythonfile.py
Below is the error message when I run the exe file:
E:\Report>mypythonfile.exe
c:\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:62
3: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and wil
l be removed in 3.3.
Traceback (most recent call last):
File "mypythonfile.py", line 14, in <module>
import ibm_db
File "c:\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importe
rs.py", line 623, in exec_module
File "site-packages\ibm_db.py", line 10, in <module>
File "site-packages\ibm_db.py", line 9, in __bootstrap__
File "imp.py", line 342, in load_dynamic
ImportError: DLL load failed: The specified module could not be found.
[16360] Failed to execute script mypythonfile
Versions
Python Version: 3.7.6
Pyinstaller Version: 3.6
ibm-db Version: 3.0.1
os : Windows
Please advise what can be done to fix this issue.
Am observing "DLL LOAD FAILED" error message while running my python file as a exe file in a server where Python or internet connect is not available. My other .exe files are working, this file containing IBM DB module is the only one having issues.
When I run this same .exe file in my local machine (laptop) - its Working, but in Server - its not working.
Below is the command I used to convert exe file:
pyinstaller -y --additional-hooks-dir=. --hidden-import ibm_db_sa.ibm_db --hidden-import ibm_db_dbi --hidden-import ibm_db --add-binary C:\Python\Python37\Lib\site-packages\ibm_db_dlls\ibm_db.dll;.\ibm_db_dlls --onefile mypythonfile.pyBelow is the error message when I run the exe file:
Versions
Please advise what can be done to fix this issue.