I'm getting strange ImportError exception while importing to my script pymqi.
- I installed WebSphere MQ for windows 7.5, both user and client versions.
- I tried to run pip install pymqi, but there was problems at C++ compiling.
- I moved headers from
C:\Program Files (x86)\IBM\WebSphere MQ\tools\c\include
toC:\Python27\include
and tried to run, there were linking problem. - I moved some
.lib
files fromC:\Program Files (x86)\IBM\WebSphere MQ\tools\Lib
toC:\Python27\libs
and it compiled well.
Then I tried this code:
import pymqi
queue_manager = "QM"
channel = "SVRCONN"
host = "192.168.1.252"
port = "1434"
conn_info = "%s(%s)" % (host, port)
qmgr = pymqi.connect(queue_manager, channel, conn_info)
qmgr.disconnect()
And at import library I got:
File "build\bdist.win32\egg\pymqe.py", line 7, in <module>
File "build\bdist.win32\egg\pymqe.py", line 6, in __bootstrap__
ImportError: DLL load failed: �� ������ ��������� ������.
Where after some manipulations I got that ...��...
means: it can't find module.
- I decide that done something wrong. Downloaded pymqi-1.3 and done
setup.py build
+setup.py install
, that finished successfully. But problem still was there. - I moved all DLL files from
C:\Program Files (x86)\IBM\WebSphere MQ\bin
toC:\Python27
And got another ImportError exception with text, that may be translated as "Bad try to access to memory address".
- I tried springpython library, but it uses pymqi inside, so falls with same exceptions.
How can I finally solve this problem? I guess there may be problem at WebSphere side, but how to check it? "WS Explorer" runs well.