我正在尝试在Windows 64位计算机上安装pymqi。
“ pip install pymqi”给出错误
Collecting pymqi
Using cached https://files.pythonhosted.org/packages/15/d9/b5babbd3f296b47a9d8bca417ca185ede9e8780ce4ca6b66bbf2dd1b7880/pymqi-1.9.2.tar.gz
Installing collected packages: pymqi
Running setup.py install for pymqi ... error
Complete output from command C:\Users\xxxxxxxxx\.virtualenvs\BBG_IBM_MQ_connection\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\xxxxxxxxx\\AppData\\Local\\
Temp\\pip-install-1qy7i0yt\\pymqi\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --recor
d C:\Users\xxxxxxxxx\AppData\Local\Temp\pip-record-hhuxyqkh\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\xxxxxxxxx\.virtualenvs\BBG_IBM_MQ_con
nection\include\site\python3.7\pymqi:
Building PyMQI client 64bits
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pymqi
copying pymqi\__init__.py -> build\lib.win-amd64-3.7\pymqi
copying pymqi\CMQC.py -> build\lib.win-amd64-3.7\pymqi
copying pymqi\CMQCFC.py -> build\lib.win-amd64-3.7\pymqi
copying pymqi\CMQXC.py -> build\lib.win-amd64-3.7\pymqi
copying pymqi\CMQZC.py -> build\lib.win-amd64-3.7\pymqi
running build_ext
building 'pymqi.pymqe' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\pymqi
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYQMI_SERVERBUILD=0 "-Ic:\Program Fi
les (x86)\IBM\WebSphere MQ\tools\c\include" -IC:\Users\xxxxxxxxx\.virtualenvs\BBG_IBM_MQ_connection\include -IC:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python37\include -IC:\Users\
xxxxxxxxx\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include" /Tcpymqi/pymqe.c /Fobuild\temp.
win-amd64-3.7\Release\pymqi/pymqe.obj
pymqe.c
pymqi/pymqe.c(78): fatal error C1083: Cannot open include file: 'cmqc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\xxxxxxxxx\.virtualenvs\BBG_IBM_MQ_connection\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\xxxxxxxxx\\AppData\\Local\\Temp\\pip-install-1qy7i0
yt\\pymqi\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\xxxxxxxxx\AppD
ata\Local\Temp\pip-record-hhuxyqkh\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\xxxxxxxxx\.virtualenvs\BBG_IBM_MQ_connection\include\site\pyt
hon3.7\pymqi" failed with error code 1 in C:\Users\xxxxxxxxx\AppData\Local\Temp\pip-install-1qy7i0yt\pymqi\
在阅读有关pymqi安装的内容时,我尝试安装“ python-dev”,python-dev是必需的。但是它也给出了一个错误,在搜索了该错误之后,从这个论坛上得知Windows并不存在“ python-dev”。
我可以在这方面寻求帮助吗?
最佳答案
pymqi
是IBM MQ SDK的Python包装器。您需要安装SDK才能从源代码编译pymqi
。
请参见https://github.com/dsuch/pymqi/issues/15#issuecomment-124772995。
https://www.ibm.com/support/knowledgecenter/SSFKSJ/com.ibm.mq.helphome.doc/product_welcome_wmq.htm