pythonpython-3.xibm-mqpymqi

Unable to install pymqi or py3mqi


The pip install py3mqi fails with the following error.

(mq) C:\Temp\>pip install py3mqi
Collecting py3mqi
  Downloading https://files.pythonhosted.org/packages/5a/b7/cbe684e6a2a7f00dee116392d38c17c03b8281a8b5a021b655833233de26/py3mqi-1.6.0.tar.gz (65kB)
     |████████████████████████████████| 71kB 770kB/s
Building wheels for collected packages: py3mqi
  Building wheel for py3mqi (setup.py) ... error
  ERROR: Complete output from command 'c:\users\dhdyk0\envs\mq\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\dhdyk0\\AppData\\Local\\Temp\\pip-install-jmsvk9ya\\py3mqi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\dhdyk0\AppData\Local\Temp\pip-wheel-3y2i7hfm' --python-tag cp36:
  ERROR: Building PyMQI client 32bits
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.6
  creating build\lib.win32-3.6\pymqi
  copying pymqi\__init__.py -> build\lib.win32-3.6\pymqi
  copying pymqi\CMQC.py -> build\lib.win32-3.6\pymqi
  copying pymqi\CMQCFC.py -> build\lib.win32-3.6\pymqi
  copying pymqi\CMQXC.py -> build\lib.win32-3.6\pymqi
  copying pymqi\CMQZC.py -> build\lib.win32-3.6\pymqi
  running build_ext
  building 'pymqi.pymqe' extension
  error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'

I've tried to install both, pymqi and py3mqi and I'm getting the same error. I'm using Python 3.6, 32-bit. Also, I have MQ Client installed as well as Visual Studio 15. There is the following path on my disk: C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC, but PlatformSDK\\lib is missing.


Solution

  • As JoshMC states pymqi now supports Python 3, and should be what you are using. pymqi binds to the MQI C Layer, and requires access to MQ C Header files as well as a C compiler / linker, when it installs.

    The error you are getting is a common Visual Studio error, when the Windows Platform SDK has not been installed. Essentially installing Visual Studio does not mean that you have installed the C / C++ compiler, and you need to do that also.