1

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.

JoshMc
  • 10,239
  • 2
  • 19
  • 38
GeoGeek
  • 13
  • 4
  • Have you installed the MQ client software? – JoshMc Jul 18 '19 at 18:44
  • You should use pymqi which now supports Python 3 and has many additional fixes. py3mqi was a fork of a much older version of pymqi when it did not support Python 3. – JoshMc Jul 18 '19 at 18:44
  • JoshMc: Yes, I have the client installed. Also, I'm getting the same error when trying to install pymqi. – GeoGeek Jul 18 '19 at 18:46
  • It appears it fails when it needs to compile the C library at the end, do you have C support in your VS 14? – JoshMc Jul 18 '19 at 18:47
  • I just noticed that I had a trial version of VS 15 which also expired. Is VS required for pymqi to work? – GeoGeek Jul 18 '19 at 18:58
  • It is is required to compile it. I think you can install a pre-compiled package as well. – JoshMc Jul 18 '19 at 19:02

2 Answers2

1

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.

chughts
  • 4,210
  • 2
  • 14
  • 27
0

Did you consider trying to install Visual Studio 2019 with the python and c package?

That is needed for some packages.

An other possible option is, that py3mqi isn't available for Python 3.6.*

Keimeno
  • 2,512
  • 1
  • 13
  • 34