You are not logged in.
$ python
Python 2.6 (r26:66714, Oct 27 2008, 10:50:31)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mod_python.apache
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/mod_python/apache.py", line 30, in <module>
import _apache
ImportError: No module named _apache
> searched _apache.so in the python packages directory and mod_python package files.
doesn't exists
$ ls /usr/lib/python2.6/site-packages/mod_python/*.so
/usr/lib/python2.6/site-packages/mod_python/_psp.so
maybe it's a bug for mod_python package,
who can help on this?
Offline
I'm pretty sure your problem is that you now have 2 python lib directories, one for 2.5 and one for 2.6. Your interpreter is set to python 2.6, but the python libraries you are trying to import are still in the python2.5 directory (/usr/lib/python2.5 vs /usr/lib/python2.6).
I'm havnig the same issue right now, python2.6 is installed, my interpreter is still python 2.5, but I installed Django and it went into the new directory so the interpreter couldn't find it. Ok, so at some point the interpreter will be 2.6, anyone know if I can just cp all the missing libraries over or if I will have to install them all afresh?
Edit: My python interpreter is now 2.6 and it appears to be finding libraries in the 2.5 directory, so that might invalidate what I said above...
Last edited by Mashi (2008-11-11 18:25:04)
Offline
file a bug report.
Offline
I'm pretty sure your problem is that you now have 2 python lib directories, one for 2.5 and one for 2.6. Your interpreter is set to python 2.6, but the python libraries you are trying to import are still in the python2.5 directory (/usr/lib/python2.5 vs /usr/lib/python2.6).
I'm havnig the same issue right now, python2.6 is installed, my interpreter is still python 2.5, but I installed Django and it went into the new directory so the interpreter couldn't find it. Ok, so at some point the interpreter will be 2.6, anyone know if I can just cp all the missing libraries over or if I will have to install them all afresh?
Edit: My python interpreter is now 2.6 and it appears to be finding libraries in the 2.5 directory, so that might invalidate what I said above...
I just checked the /usr/lib/python2.5 ,
yes , for many modules such as _ldap.
$ python
Python 2.6 (r26:66714, Oct 27 2008, 10:50:31)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ldap;
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
it's the right reason.
but also, No,
I still can't find the _apache.so under any /usr/lib/python*
$ find /usr/lib/python* | grep apache.so | wc -l
0
Thanks for reponse. i'll fire a bug for this.
Offline
did you figure out a workaround? looks like xen has a similar problem. it installs its python packages into /usr/lib/python, which is not in the sys.path. If i add that path to PYTHONPATH, i get the same error as you,
ImportError: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
Offline
I don't remember every seeing a bug report about this. Did anybody file one?
Offline
Allan, fired one, Thanks for reminder, and sorry for the late...
http://bugs.archlinux.org/task/12607
Offline