I have set the environment variables (LIB, INCLUDE, MQ_INSTALLATION_PATH), pymqi installed successfully with pip yet I am getting this error:

$ C:/Users/myuser/AppData/Local/Microsoft/WindowsApps/python3.10.exe d:/workspace/myproject/app/python/mq-writer/src/mq_writer.py
Traceback (most recent call last):
  File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pymqi\__init__.py", line 132, in <module>
    from . import pymqe # type: ignore
ImportError: DLL load failed while importing pymqe: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\workspace\myproject\app\python\mq-writer\src\mq_writer.py", line 1, in <module>
    import pymqi
  File "C:\Users\myuser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pymqi\__init__.py", line 134, in <module>
    import pymqe # type: ignore # Backward compatibility
ModuleNotFoundError: No module named 'pymqe'

I have downloaded and redirected my MQClient libraries to C:\Program Files (x86)\IBM\WebSphere MQ as mentioned in How to install pymqi in window 64-bit?

I followed the troubleshooting portion of https://www.ibm.com/support/pages/system/files/inline-files/How%20to%20install%20Python%20IBM%20MQ%20module%20PyMQI%20in%20Linux%20and%20Windows_2.pdf and ran set-visual-studio-env.bat

After doing this, I am still getting this error stated above. Is there anything else I need to do in order to use pymqi with the MQClient libraries or troubleshoot on windows?

Using: Python-3.10.11 pymqi-1.12.10

0

There are 0 best solutions below