安装Python Pymqi包时出现问题

安装Python Pymqi包时出现问题,python,windows,ibm-mq,pymqi,Python,Windows,Ibm Mq,Pymqi,这是我在这个论坛上的第一篇帖子。如果我没有遵守协议,请告诉我 C:\>python --version Python 2.7.11 操作系统:Windows版本7 WMQ:8.2 我正在尝试安装Pythonpymqi包。经过几个小时的尝试和搜索,我决定在网上发布这个问题,希望能得到一些帮助。下面是我发出的命令和我得到的错误 C:>pip安装pymqi Collecting pymqi Using cached pymqi-1.5.4.tar.gz Requirement alread

这是我在这个论坛上的第一篇帖子。如果我没有遵守协议,请告诉我

C:\>python --version
Python 2.7.11
操作系统:Windows版本7

WMQ:8.2

我正在尝试安装Pythonpymqi包。经过几个小时的尝试和搜索,我决定在网上发布这个问题,希望能得到一些帮助。下面是我发出的命令和我得到的错误

C:>pip安装pymqi

Collecting pymqi
  Using cached pymqi-1.5.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): testfixtures in c:\python27\lib\site-packages (from pymqi)
Installing collected packages: pymqi
  Running setup.py install for pymqi ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\reyesv~1\\appdata\\local\\temp\\1\\pip
-build-4qqnkt\\pymqi\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --rec
ord c:\users\reyesv~1\appdata\local\temp\1\pip-u2jdz5-record\install-record.txt --single-version-externally-managed --compile:
    Building PyMQI client 64bits
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\pymqi
    copying pymqi\__init__.py -> build\lib.win-amd64-2.7\pymqi
    copying pymqi\CMQC.py -> build\lib.win-amd64-2.7\pymqi
    copying pymqi\CMQCFC.py -> build\lib.win-amd64-2.7\pymqi
    copying pymqi\CMQXC.py -> build\lib.win-amd64-2.7\pymqi
    copying pymqi\CMQZC.py -> build\lib.win-amd64-2.7\pymqi
    running build_ext
    building 'pymqi.pymqe' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\pymqi
    C:\Users\reyesviloria362048\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DND
EBUG -DPYQMI_SERVERBUILD=0 "-Ic:\Program Files (x86)\IBM\WebSphere MQ\tools\c\include" -Ic:\python27\include -Ic:\python27\PC /Tcpymqi/pymqe.c /Fobuil
d\temp.win-amd64-2.7\Release\pymqi/pymqe.obj
    pymqe.c
    pymqi/pymqe.c(240) : error C2275: 'MQCSP' : illegal use of this type as an expression
            C:\IBM\WebSphere MQ\tools\c\include\cmqc.h(4072) : see declaration of 'MQCSP'
    pymqi/pymqe.c(240) : error C2146: syntax error : missing ';' before identifier 'csp'
    pymqi/pymqe.c(240) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(240) : error C2059: syntax error : '{'
    pymqi/pymqe.c(247) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(247) : error C2224: left of '.AuthenticationType' must have struct/union type
    pymqi/pymqe.c(248) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(248) : error C2224: left of '.CSPUserIdPtr' must have struct/union type
    pymqi/pymqe.c(249) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(249) : error C2224: left of '.CSPUserIdLength' must have struct/union type
    pymqi/pymqe.c(250) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(250) : error C2224: left of '.CSPPasswordPtr' must have struct/union type
    pymqi/pymqe.c(251) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(251) : error C2224: left of '.CSPPasswordLength' must have struct/union type
    pymqi/pymqe.c(256) : error C2065: 'csp' : undeclared identifier
    pymqi/pymqe.c(256) : warning C4133: '=' : incompatible types - from 'int *' to 'PMQCSP'
    error: command 'C:\\Users\\reyesviloria362048\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' fa
iled with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\reyesv~1\\appdata\\local\\temp\\1\\pip-build-4qqnkt\\pymqi\\se
tup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\reyesv~1\ap
pdata\local\temp\1\pip-u2jdz5-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\reyesv~1\a
ppdata\local\temp\1\pip-build-4qqnkt\pymqi\

你需要安装< /p>劳伦特,我已经为Python 2.7安装了微软Visual C++编译器。我仍然收到相同的错误。顺便说一句,easy_安装也失败了。不知道出了什么问题。检查此错误的源代码:
pymqi/pymqe.c(240):错误C2275:“MQCSP”:非法使用此类型作为表达式:\IBM\webspheremq\tools\c\include\cmqc.h(4072):请参阅“MQCSP”的声明。
…根据,似乎只支持MinGW32,而不支持本机Windows。