gpt4 book ai didi

python - 如何在window 64位下安装pymqi?

转载 作者:行者123 更新时间:2023-12-02 06:39:47 31 4
gpt4 key购买 nike

我正在尝试在 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\

我尝试安装“python-dev”,因为我读到了 pymqi 安装,python-dev 是必要的。但它也给出了一个错误,在搜索该错误后,从这个论坛得知“python-dev”在 Windows 上不存在。

我可以获得这方面的帮助吗?

最佳答案

从此链接下载 MQ 客户端库: https://ibm.biz/IBM-MQC-Redist-Win64zip

下载并解压后,您将在此位置找到 cmqc.h 文件:

9.3.0.0-IBM-MQC-Redist-Win64\tools\c\include

C: 驱动器上创建一个新文件夹:

C:\Program Files (x86)\IBM\WebSphere MQ

复制tools子文件夹

9.3.0.0-IBM-MQC-Redist-Win64\tools\c\include

C:\Program Files (x86)\IBM\WebSphere MQ

现在运行:

pip install pymqi

输出应与此类似:

C:\Windows\system32>pip install pymqi
Collecting pymqi
Using cached pymqi-1.12.8.tar.gz (88 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pymqi, since package 'wheel' is not installed.
Installing collected packages: pymqi
Running setup.py install for pymqi ... done
Successfully installed pymqi-1.12.8

对我来说它有效。请尝试一下,让我知道它是否适合您。

关于python - 如何在window 64位下安装pymqi?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56281909/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com