I am experiencing an issue with IfxPy installation.
The operating system is windows 64 bit and the 64-bit version of Python 3.7.4 is runned.
After pip installation of the wheel file IfxPy-3.0.3-cp37-cp37m-win_amd64.whl from - https://pypi.org/project/IfxPy/#files the pip list command or help(modules) command from interpreteur shows that the module is installed:
>>> help("modules")
Please wait a moment while I gather a list of all available modules... IfxPy [...other modules...]
I try to find the location of the module, and it is
>>> imp.find_module('IfxPy') (<_io.BufferedReader name='C:\\Python\\lib\\site-packages\\IfxPy.pyd'>,
'C:\\Python\\lib\\site-packages\\IfxPy.pyd', ('.pyd', 'rb', 3))
The PATH environmental variable contains the abovementioned path.
However, when I try to import the module from IDLE interpreteur I get the error:
>>> import IfxPy
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
import IfxPy ImportError: DLL load failed: The specified module could not be found.
What could be the potential source of the error and how can it be solved? Thanks for help.
Related
I am trying to get QCustomPlot2 working on Ppython 3.7 Anaconda installation Windows 10 x64
I tried installing via pip and easy_install from building qcustomplot2 via qt cmd and moved the .pyd file into several locations. I updated pyqt from conda which then broke the install. However even when qcustomplot2 was installed, and not giving the dll error I was getting the stack buffer overflow error when calling it from the example.
I am using the PyCharm IDE
Well, not really an answer but a workaround:
I use PyQt5 instead of PySide2 and you have to import it prior to QCustomPlot2
Doesn't work:
>>> import QCustomPlot2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing QCustomPlot2
Works:
>>> import PyQt5
>>> import QCustomPlot2
I was working with Python 3.7 and OpenCV 4.2 in Pycharm IDE (Windows10). The system environment variables were changed by one of my co-workers by accident (we don't know what happened exactly). Then I found that my code did not work with this error!:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
Then I used this command:
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip install opencv-python
All of them executed successfully, but when I write import cv2 the above error is appeared. By the way, the system knows command Python, it shows the right path to the python.exe. Moreover, commands like import numpy works correctly! How can I fix this problem?
I found the answer! There was an extra cv2.py file in site-packages/cv2 path. So, I removed it and the code worked
After typing "import gurobipy", this would show up:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\1\AppData\Local\Programs\Python\Python38\lib\site-packages\gurobipy\__init__.py", line 1, in <module>
from .gurobipy import *
ImportError: DLL load failed while importing gurobipy: 找不到指定的模块。(EN:The specified module could not be found)
I've tried uninstalling and reinstalling python and gurobi, and made sure both are the 64 bits version.
There is a new Windows safety feature that changes how DLLs are loaded in Python 3.8 and that affects the installation of Gurobi.
You need to tell Python how to find the library again. This can be done either by
copying the gurobi90.dll from gurobi901\win64\bin\ to PYTHON_INSTALLATION_PATH\lib\site-packages\gurobipy\ or by
specifying how the library can be found within the current Python environment:
import os
os.add_dll_directory(os.path.join(os.getenv('GUROBI_HOME'), 'bin'))
The Anaconda Python distribution is not affected by this change and the installation works as intended.
note: This is only affecting Gurobi 9.0.1.
I am running Python 3.6.4 :: Anaconda custom (64-bit) on a Windows 10 x64 system, with a script that attempts to load QP_Solver from cvxopt. This was working fine until today, when running the same python script gave the following error. Simply import cvxopt gives the same error too.
ImportError: DLL load failed: The specified module could not be found.
Error Traceback
Traceback (most recent call last):
File "C:\Users\nyxynyx\optimization\cvxopt_solver.py", line 3, in <module>
from cvxopt import solvers, matrix
File "C:\Users\nyxynyx\Anaconda3\lib\site-packages\cvxopt\__init__.py", line 34, in <module>
import cvxopt.base
ImportError: DLL load failed: The specified module could not be found.
Installed Packages
numpy==1.14.3+mkl
cvxopt==1.1.9
These were installed using precompiled binaries from https://www.lfd.uci.edu/~gohlke/pythonlibs
Inside the directory C:\Users\nyxynyx\Anaconda3\Lib\site-packages\cvxopt, I see the file base.cp36-win_amd64.
MinGW
An answer to a similar question asked to look at C:\Anaconda3\envs\foo\Library\mingw-w64\bin where foo is the env name. C:\Users\nyxynyx\Anaconda3\envs\foo\Library contains some DLLs, not sure which one we should be looking for?
Running the Command Prompt as an Administrator
Running the script in an Anaconda Prompt started as an Administrator does not solve the error.
Any ideas please?
Could someone please advise in resolving the below error?
Python 3.5.1 / jpype1-py3 0.5.5.2 installed on 64 bit windows machine.
I've cannot find _jtype anywhere in Lib or Lib/site-packages.
Regards
Steve
>>> import jpype
Traceback (most recent call last):
File "", line 1, in
import jpype
File "C:\Program Files\Python35\lib\site-packages\jpype\__init__.py", line 18, in
from ._jpackage import *
File "C:\Program Files\Python35\lib\site-packages\jpype\_jpackage.py", line 18, in
import _jpype
ImportError: DLL load failed: The specified module could not be found.
According to this thread, you need to make sure setup.py is pointing to the correct jvm directory. looking into setup.py of you can see that it searches for JAVA_HOME system variable:
java_home = os.getenv('JAVA_HOME', '')
found_jni = False
if os.path.exists(java_home):
platform_specific['include_dirs'] += [os.path.join(java_home, 'include')]
# The code goes on
It may be that you didn't configure this system variable.
Since you installed via pip, and probalby didn't touch te setup.py file, I recommend you to do the following:
1-) Uninstall the package, and delete the build directories
2-) Set JAVA_HOME variable following this
3-) Download JPype manually from github and install it using python setup.py install
Good luck, tell me if it works