schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.14k stars 271 forks source link

Unable to run PyMol on Windows 10 - build from source #60

Open eusebiu opened 4 years ago

eusebiu commented 4 years ago

I am trying to build PyMol from source and after build I get this error when running it.

I only used Win32 libs (freeglut, freetype, glew32, libpng, msgpack) and the build was successful.

C:\PyMol\Scripts>pymol.bat C:\PyMol\Scripts>"C:\PyMol\Scripts\....\Python37-32\python.exe" "C:\PyMol\Scripts\..\Lib\site-packages\pymol__init.py" Traceback (most recent call last): File "C:\PyMol\Scripts\..\Lib\site-packages\pymol\init.py", line 64, in import pymol File "C:\PyMol\Lib\site-packages\pymol\init__.py", line 562, in import pymol._cmd ImportError: DLL load failed: %1 is not a valid Win32 application.

Line 562 is: import pymol._cmd _cmd = sys.modules['pymol._cmd']

Any ideas what is the issue? How can I configure the setup.py to build in x64?

speleo3 commented 4 years ago

This could happen for example if you have an incompatible C:\Windows\System32\zlib.dll

eusebiu commented 4 years ago

I got the one from zlib-msvc14-x86.1.2.11.7795 and still no luck.

speleo3 commented 4 years ago

Does the bundle from https://pymol.org/#download work? Download the ZIP, unpack, and run PyMOLWin.exe (or PyMOLWinWithConsole.bat)

eusebiu commented 4 years ago

Yes, it does. I was also able to install & run the precompiled version of PyMol (https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol) with no issues.

cgohlke commented 4 years ago

ImportError: DLL load failed: %1 is not a valid Win32 application.

Try to open pymol/_cmd.cp37-win32.pyd using Dependencies and check for missing or conflicting DLLs.

eusebiu commented 4 years ago

All dependecies are there and now I get: C:\PyMol\Scripts>pymol.bat

C:\PyMol\Scripts>"C:\PyMol\Scripts\....\Python38-32\python.exe" "C:\PyMol\Scripts\..\Lib\site-packages\pymol__init.py" Traceback (most recent call last): File "C:\PyMol\Scripts\..\Lib\site-packages\pymol\init.py", line 64, in import pymol File "C:\PyMol\Lib\site-packages\pymol\init__.py", line 562, in import pymol._cmd ImportError: DLL load failed while importing _cmd: The specified module could not be found.

baodongning commented 2 years ago

do u fix this?

Liuyangying commented 2 years ago

I also meet this issue, how do you fix it?

uKitago commented 2 years ago

Me too. Any update?

uKitago commented 2 years ago

I might have a solution. When I check the dependencies for other DLLs as @cgohlke suggested,

Try to open pymol/_cmd.cp37-win32.pyd using Dependencies and check for missing or conflicting DLLs.

I found netcdf.dll depends on something like hdf5.dll. Temporarily I made VMD molfile plugins disable (--no-vmd-plugins), and after compiling again, PyMOL started!! (although it can be launched only from Anaconda Prompt, cannot from .bat file directly) You may have some missing dependencies on one/some of your required DLLs.

Hope that helps.