[Tutor] Problems install pymqi

Ruby Student ruby.student at gmail.com
Fri Aug 19 11:30:40 EDT 2016


Hello Team,

I am having a bad day (actually second day) trying to get *pymqi *installed.
Any help is greatly appreciated.
Yesterday I installed Python on my desktop. I am trying to use the Python
WebSphere MQ API and learn Python at the same time.

*OS*: Windows 7 Enterprise x64 Edition, Build 7601: SP1
*Python*: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC
v.1500 64 bit (AMD64)] on win32
*C++*: Microsoft Visual C++ Compiler for Python 2.7
*Python*: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC
v.1500 64 bit (AMD64)] on win32

I also have a full blown IBM WebSphere MQ environment, meaning that I have
all the header files, specially the *cmqc.h*
C:\Python27>*dspmqver*
Name:        *WebSphere MQ*
Version:     8.0.0.4
Level:       p800-004-151017

I tried installing *pymqi* using two different methods and I got errors
both times.

*METHOD 1*: Using *easy_install*

C:\Python27>*easy_install pymqi*
Searching for pymqi
Reading https://pypi.python.org/simple/pymqi/
Best match: pymqi 1.5.4
Downloading
https://pypi.python.org/packages/a6/c6/518923b9ea2bea36e30bcbe0f23c2ce00202a44e1d0d6b6f1d94c68e7dc0/pymqi-.5.4.tar.gz#md5=2289f37b30fd40f
08f8edb2fe3872f31
Processing pymqi-1.5.4.tar.gz
Writing
c:\users\myuserid\appdata\local\temp\1\easy_install-wzpfj1\pymqi-1.5.4\setup.cfg
Running pymqi-1.5.4\setup.py -q bdist_egg --dist-dir
c:\users\reyesv~1\appdata\local\temp\1\easy_install-wzpfj1\pymqi-1.5.4\egg-dist-tmp-upo7kw
Building PyMQI client 64bits
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: Setup script exited with error: command
'C:\\Users\\myuserid\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual
C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

C:\Python27>

*METHOD 2*: Using *pip*

C:\Python27>*pip install 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\\myuserid\\appdata\\local\\temp\\1\\pip
-build-cgd7j6\\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-5ganmv-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\myuserid\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
/Fobuild\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' failed 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-cgd7j6\\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-5ganmv-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-cgd7j6\pymqi\


More information about the Tutor mailing list