pymol-open-source icon indicating copy to clipboard operation
pymol-open-source copied to clipboard

Unable to run PyMol on Windows 10 - build from source

Open eusebiu opened this issue 6 years ago • 10 comments

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?

eusebiu avatar Oct 29 '19 10:10 eusebiu

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

speleo3 avatar Dec 03 '19 16:12 speleo3

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

eusebiu avatar Dec 03 '19 22:12 eusebiu

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

speleo3 avatar Dec 04 '19 06:12 speleo3

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.

eusebiu avatar Dec 04 '19 08:12 eusebiu

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.

cgohlke avatar Dec 04 '19 18:12 cgohlke

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.

eusebiu avatar Dec 05 '19 06:12 eusebiu

do u fix this?

baodongning avatar Sep 14 '21 17:09 baodongning

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

Liuyangying avatar Mar 08 '22 22:03 Liuyangying

Me too. Any update?

uKitago avatar Jul 11 '22 18:07 uKitago

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.

uKitago avatar Jul 11 '22 19:07 uKitago