Unable to install pymqi because of Python.h
Hi,
When I tried building PyMQI 1.1 in Linux which has Websphere MQ V6.0 using,
python setup.py build
it (gcc compiler) throwed an error saying:
Python.h file not found
Looks like pymqe.c is expecting a local Python.h header file. I couldn't find it in the download.
What's the solution for this? Please help me resolve this.
Thanks,
Rajen
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- PyMQI Edit question
- Assignee:
- Dariusz Suchojad Edit question
- Solved by:
- Rajen
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
By the by, these are versions that I use
Python 2.4.3
GCC 4.1.2 20080704
Revision history for this message
|
#2 |
Well, I found out what's happening.
I was missing the Python developer module.
We can see Python.h in /usr/include/
folder if it is installed.
But, I've new problem now.
>>> import pymqi
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "pymqi.py", line 88, in ?
import pymqe, CMQC, CMQCFC, CMQXC
ImportError: No module named pymqe
Getting the above error, even though, pyqme.so & all CMQxxx files are present in
/usr/lib64/
Please let me know what's happening here & what I'm missing.
The above path is listed under sys.path of Python
Revision history for this message
|
#3 |
Hi Rajen,
with regards to Python.h - you're right that the knowledge was sort of assumed because that's how installing pretty much any Python C extension from source code looks like. I've opened the bug #731009 and will make it clear in the docs that a relevant package needs to be installed.
As for the "No module named pymqe" thing, can you please uninstall PyMQI (using exactly the means we discussed over at the question #144621) and send through the whole output of doing the "python setup.py install" invocation? I'd like to see what exactly got installed and where to.
By the way, what system is it? Any particular reason you need to use such an ancient Python version?
Thanks!
Revision history for this message
|
#4 |
Hi Dariusz,
here is the output of build & install
$ sudo python setup.py build client
Building PyMQI client 64bits
running build
running build_py
running build_ext
building 'pymqe' extension
gcc -pthread -fno-strict-
gcc -pthread -shared build/temp.
running build_scripts
creating build/scripts-2.4
copying and adjusting scripts/mqmess.py -> build/scripts-2.4
copying and adjusting scripts/browse.py -> build/scripts-2.4
copying and adjusting scripts/inq.py -> build/scripts-2.4
changing mode of build/scripts-
changing mode of build/scripts-
changing mode of build/scripts-
$ sudo python setup.py install
Building PyMQI client 64bits
running install
running build
running build_py
running build_ext
running build_scripts
running install_lib
copying build/lib.
copying build/lib.
copying build/lib.
copying build/lib.
copying build/lib.
byte-compiling /usr/lib64/
byte-compiling /usr/lib64/
byte-compiling /usr/lib64/
byte-compiling /usr/lib64/
running install_scripts
copying build/scripts-
copying build/scripts-
copying build/scripts-
changing mode of /usr/bin/inq.py to 755
changing mode of /usr/bin/browse.py to 755
changing mode of /usr/bin/mqmess.py to 755
It is red-hat linux. Have some dependencies, that's why using python 2.4
Revision history for this message
|
#5 |
A mainframe, huh? I certainly remember using PyMQI on s390x though at that time it was CentOS and some other Python version. But it should be doable anyway.
So, now that you've installed it, can you please post the output of the following?
$ cd /
$ python -V
$ python -vvv -m "pymqi"
The point of cd-ing to / is to make sure there's no "pymqi" module laying around the directory we're doing the test in.
Revision history for this message
|
#6 |
Here is the output
$ python -V
Python 2.4.3
$ python -vvv -m "pymqi"
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import site # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import os # precompiled from /usr/lib64/
import posix # builtin
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import posixpath # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import stat # precompiled from /usr/lib64/
import errno # builtin
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import UserDict # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import copy_reg # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import types # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
import japanese # directory /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import japanese # precompiled from /usr/lib64/
import japanese.aliases # directory /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import japanese.aliases # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
import encodings # directory /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import encodings # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import codecs # precompiled from /usr/lib64/
import _codecs # builtin
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import encodings.aliases # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import warnings # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import linecache # precompiled from /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# /usr/lib64/
import encodings.latin_1 # precompiled from /usr/lib64/
Python 2.4.3 (#1, Dec 10 2010, 17:28:02)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
python: module pymqi not found
Revision history for this message
|
#7 |
Hm, how about starting Python with
$ python -vv
and then doing "import pymqi" in the Python shell?
Revision history for this message
|
#8 |
Similar output.
>>> import pymqi
# trying pymqi.so
# trying pymqimodule.so
# trying pymqi.py
# trying pymqi.pyc
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib64/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
# trying /usr/lib/
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named pymqi
>>>
Revision history for this message
|
#9 |
Right, but it isn't similar to what you stumbled upon when you were opening the question, and that was "ImportError: No module named pymqe". I don't mean to suggest anything but are you 200% sure it's the same Python binaries you're using for installing and then running PyMQI?
Revision history for this message
|
#10 |
If you don't mind, can you please let me know how to find out that I'm using the same Python binaries for installing & running?
Revision history for this message
|
#11 |
Rajen, can you please contact me directly so that we can't arrange for an IRC session or something? I'll update the report later on with the details of our finding but I can see that right now we're dealing with something that's rather concerning your Python /or/ MQ installation, and not PyMQI as such. It would be helpful if we could talk directly.
http://
Many thanks!
Revision history for this message
|
#12 |
Rajen, is there any way I can still help you? If not, if the issue has been resolved already, then can you please close the question? What was the cause by the way? Thanks!
Revision history for this message
|
#13 |
Well, I don't know what the exactly is causing this problem. Instead of scratching my head, i switched over to other machine & it's working there.
Thank you very much for your quick answers.
Really appreciate that.