【问题标题】:How to install pymqi in window 64-bit?如何在 64 位窗口中安装 pymqi?
【发布时间】:2020-02-28 05:22:34
【问题描述】:

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

我可以得到帮助吗?

【问题讨论】:

  • 这不能解决我的错误,我有错误:致命错误 C1083:无法打开包含文件:'cmqc.h':没有这样的文件或目录错误:命令'C:\Program Files ( x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe

标签: python python-3.x ibm-mq windows64 pymqi


【解决方案1】:

【讨论】:

    【解决方案2】:

    您需要 2 个东西 - IBM MQ 客户端和来自 Microsoft 的 Visual C++

    https://www.microsoft.com/en-au/download/details.aspx?id=44266 C++ 构建可在此处获得,并且

    IBM 站点上提供了 IBM MQ 客户端。设置 MQ 服务/管理器将是矫枉过正。只要客户端就足够了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多