-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: DLL load failed while importing _jpype #1167
Comments
It'd be great to have the error message in English. Setting the locale in your operating system or setting a shell variable should do the trick |
I'm seeing basically the same thing in a Windows 11 sandbox with the standard python.org 3.12.4 installed: C:\Users\WDAGUtilityAccount>py
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\WDAGUtilityAccount\AppData\Local\Programs\Python\Python312\Lib\site-packages\jpype\__init__.py", line 18, in <module>
import _jpype
ImportError: DLL load failed while importing _jpype: The specified module could not be found.
>>> |
I don't know why, but it's not finding This really doesn't make any sense. The msvcp140.dll can be found and loaded using ctypes.util.find_library and ctypes.WinDLL, and then importing jpype will work just fine after that. This almost looks like a python bug, but it could be some weird windows configuration thing. The "correct" solution to recommend is probably to install the Latest Microsoft Visual C++ Redistributable Version but it really shouldn't be necessary since it comes with Java and is in the system path already. |
Traceback (most recent call last):
File "C:/Users/057776/PycharmProjects/funds-app-mock/utils/encrypt.py", line 9, in
import jpype
File "C:\Users\057776\PycharmProjects\funds-app-mock\venv\lib\site-packages\jpype_init_.py", line 18, in
import _jpype
ImportError: DLL load failed while importing _jpype: 找不到指定的模块。
version = "1.5.0"
JPype1-1.5.0-cp38-cp38-win_amd64.whl
wind10 ,64
(venv) C:\Users\057776\PycharmProjects\funds-app-mock>pip install JPype1
Requirement already satisfied: JPype1 in c:\users\057776\pycharmprojects\funds-app-mock\venv\lib\site-packages (1.5.0)
Requirement already satisfied: packaging in c:\users\057776\pycharmprojects\funds-app-mock\venv\lib\site-packages (from JPype1) (23.2)
The text was updated successfully, but these errors were encountered: