jacobjma / PyQSTEM

A Python interface to the electron microscopy simulation program QSTEM
GNU General Public License v3.0
60 stars 30 forks source link

Install error on Windows: DLL load failed: The specified module could not be found. #10

Open jiadongdan opened 6 years ago

jiadongdan commented 6 years ago

I used Anaconda to install pyqstem in the following step:

  1. create an env named qstem

  2. activate the above env, install dependencies: conda install numpy matplolib scipy jupyter cython scikit-image conda install -c conda-forge ase

  3. cd to pyqstem folder downloaded, install using python setup.py install

After all these steps, I open jupyter notebooks to run the examples provided. failed with error msg

DLL load failed: The specified module could not be found.

I checked the folder where pyqstem is installed, qstem_interface.cp36-win_amd64.pyd has been generated by the compiler, is this file the dll file needed?

Any solution to this?

BTW: I successfully installed on MacOX, but I came across this problem in Windows platform...

image

jiadongdan commented 6 years ago

problem solved!!!

mragon2 commented 5 years ago

I have this problem also. Can you please explain me how you fixed it ?

jacobjma commented 5 years ago

This error is most likely related to missing environment variables. The program has to find the fftw dll's included in the repo.

From a console, you should be able to write where libfftw3l-3.dll which should return the full path of the file.

If the above does not return the full path, you can try to set the environment variable manually. See e.g. https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10

Write again if you continue to have problems.

DavidLanders95 commented 4 years ago

This error is most likely related to missing environment variables. The program has to find the fftw dll's included in the repo.

From a console, you should be able to write where libfftw3l-3.dll which should return the full path of the file.

If the above does not return the full path, you can try to set the environment variable manually. See e.g. https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10

Write again if you continue to have problems.

I have this problem also on windows 10 - I was able to install pyqstem on Linux with no problem.

This problem comes for after I solved https://github.com/jacobjma/PyQSTEM/issues/16 with xiongh15's suggestion.

problem solved!!!

Can you elaborate on how you solved the problem Jiadong93? I have the same error on windows 10 when trying to install pyqstem on anaconda.

DavidLanders95 commented 4 years ago

I fixed this issue. I had to place the following files: libfftw3-3.dll, libfftw3f-3.dll, libfftw3l-3.dll into my anaconda folder with pyqstem installed - "users\username\anaconda\envs\env_name\site-packages\pyqstem-1.0.3-py3.8-win-amd64.egg\pyqstem. Now pyqstem was able to find the fftw dlls and execute.

It's worth noting that this issue probably arose because of issue #16, and that in order to get pyqstem to install on windows I had to edit setup.py. This is probably the root of this issue here. If I did not edit setup.py. I would get the error "LINK : fatal error LNK1181: cannot open input file 'fftw3.lib'" as noted in that issue.