I have updated this to change the question how can I import from an .so file, for which there is already a named .py file front end.
On CentOS 6.6, I have Python 2.6.6 installed, and am I am trying to install InformixDB-2.5.
The python setup.py build_ext
command returns a few warnings, but the gcc
step completes without errors.
As root, the python setup.py install
command completes without errors.
My problem is when I run Python and enter import informixdb
, I get a module not found error
I have read this, and already have an informixdb.py in site-packages along with _informixdb.so
. If I invoke Python from that directory and import informixdb
, I get no error. I'm just not sure which environment variable to set to pick this up, or if I should symlink to this, but do not know what to symlink.
This is the output of python setup.py install
running install
running build
running build_py
running build_ext
running install_lib
running install_egg_info
Removing /usr/lib/python2.6/site-packages/InformixDB-2.5-py2.6.egg-info
Writing /usr/lib/python2.6/site-packages/InformixDB-2.5-py2.6.egg-info
Here is the error
[dbadmin@bucky InformixDB-2.5]$ python informixdb.py
Traceback (most recent call last):
File "informixdb.py", line 146, in <module>
from _informixdb import *
ImportError: No module named _informixdb