On 27-Oct-2017 18:41, mathog wrote:
I'm trying to build PyMol in Msys2. The build went ok and it
constructed a _cmd.pyd for this program using a command almost
identical to the one used previously and successfully on mingw (that
used the pymol.org python for window, this time it is the
mingw32/bin/python2.7 that is used). The build was copied out to a
file structure like this:
top
bin
python binary and all mingw32 dll's listed by ntdll for _cmd.py
lib/python2.7/site-packages
pymol pieces in here
chempy pieces in here
In a mingw32 shell this works:
export
PYMOL_PATH=/home/david/PymolU/lib/python2.7/site-packages/pymol/pymol_path
bin/python2.7
/home/david/PymolU/lib/python2.7/site-packages/pymol/__init__.py
Pymol starts right up.
However...
In a W7 Cmd shell (this is the method that worked previously when Pymol
was built for the native Windows Python2.7 distribution [from
python.org] using mingw)
set
PYMOL_PATH=C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages\pymol\pymol_path
python.exe "C:\progs\msys32\home\david\PymolU\\lib\pyt
.7\site-packages\pymol\__init__.py"
Traceback (most recent call last):
File
"C:\progs\msys32\home\david\PymolU\\lib\python2.7\site-packages\pymol\__init__.py",
line 64, in <module>
import pymol
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/pymol/__init__.py",
line 556, in <module>
import pymol._cmd
ImportError: DLL load failed: The specified module could not be found.
Also in a Cmd shell:
python.exe
import chempy
import pymol
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/pymol/__init__.py",
line 556, in <module>
import pymol._cmd
import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/numpy/__init__.py",
line 142, in <module>
from . import add_newdocs
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/numpy/add_newdocs.py",
line 13, in <module>
from numpy.lib import add_newdoc
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/numpy/lib/__init__.py",
line 8, in <module>
from .type_check import *
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/numpy/lib/type_check.py",
line 11, in <module>
import numpy.core.numeric as _nx
File
"C:\progs\msys32\home\david\PymolU\lib\python2.7\site-packages/numpy/core/__init__.py",
line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes
all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be
found.
However in a mingw32 shell all of this works fine:
./python2.7
Python 2.7.14 (default, Sep 18 2017, 09:26:14) [GCC 7.2.0 32 bit] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import chempy
import pymol
import numpy
#no errors of any sort
chempy and numpy are also in site-packages. chempy was built with
pymol. I checked
the system log files and couldn't find any events that corresponded to
the failed dll loads.
In summary, within a mingw32 window Pymol works, its _cmd.pyd will load.
Within a
W7 cmd.exe it does not work, _cmd.pyd will not load.
The dll's in the directory with python.exe are:
glew32.dll
libfreeglut.dll
libfreetype-6.dll
libgcc_s_dw2-1.dll
libopenblas.dll
libpng16-16.dll
libpython2.7.dll
libssp-0.dll
libstdc++-6.dll
libwinpthread-1.dll
libxml2-2.dll
Dependency walker had this in its error box when it opened _cmd.pyd
Error: At least one required implicit or forwarded dependency was not
found.
Error: At least one module has an unresolved import due to a missing
export function in an implicitly dependent module.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing
export function in a delay-load dependent module.
It listed a large number of API-MS-WIN-CORE_*dll's that it could find.
However, it said that it could not find these DLL's, none of which seem
to be part of Msys2:
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-ROBOBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL
The missing ones are required by MS libraries, like MSHTML.DLL and
IEFRAME.DLL. If I double click on the yellow "?" for
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL it says (possible typo, it could
not be copy and pasted):
C:\progs\msys32\home\david\PymolU\lib\python2.7\site-pacakges\pymol\API-MS-WIN-CORE-WINRT-STRING-L1-1.0.dll
was not found.
What is that library? As far as I can tell it is looking there because
it is called (very indirectly, like 5 DLLs in) from _cmd.pyd.
The dll one level up from API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL was
iertutil and ntldd run
inside mingw shows only these:
ntldd /c/windows/system32/iertutil.dll
msvcrt.dll => C:\windows\system32\msvcrt.dll (0x00b20000)
ntdll.dll => C:\windows\system32\ntdll.dll (0x00bd0000)
KERNEL32.dll => C:\windows\system32\KERNEL32.dll (0x00b20000)
OLEAUT32.dll => C:\windows\system32\OLEAUT32.dll (0x00820000)
USER32.dll => C:\windows\system32\USER32.dll (0x00c80000)
WINTRUST.dll => C:\windows\system32\WINTRUST.dll (0x004a0000)
CRYPT32.dll => C:\windows\system32\CRYPT32.dll (0x00df0000)
USERENV.dll => C:\windows\system32\USERENV.dll (0x00470000)
ADVAPI32.dll => C:\windows\system32\ADVAPI32.dll (0x00d50000)
RPCRT4.dll => C:\windows\system32\RPCRT4.dll (0x00df0000)
ole32.dll => C:\windows\system32\ole32.dll (0x00b20000)
XmlLite.dll => C:\windows\system32\XmlLite.dll (0x01f60000)
whereas dependency walker shows in addition a bunch of API-MS-WIN*
dependencies, most of which it resolved, but not others, like
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
This link suggests that the API-MS-WIN* things are a red herring, and
that the real
issue is the missing dcomp.dll.
https://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems
In short, I am baffled. There is some difference between the way these
programs work in the CMD window versus how they work under mingw32.
Thanks,
David Mathog
mat...@caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users