2

I am trying to run a python program which I have downloaded. It requires mod_python so I installed the latest version from source.

I am also running Python 2.7 on Ubuntu 12.04.

When I run the python file I get the following error:

from mod_python import apache
  File "/usr/local/lib/python2.7/dist-packages/mod_python/apache.py", line 30, in <module>
    import _apache
ImportError: No module named _apache

This error seems to be in mod_python and not the program I have downloaded.

Can anyone help me solve this? I have tried installing different versions of mod_python but have still not managed to get it to work.

Thanks

sam
  • 2,469
  • 8
  • 37
  • 57
  • Is there a particular reason why you're using dead software? – Ignacio Vazquez-Abrams Jan 15 '13 at 13:13
  • I am trying to run a project which was created a while ago. It is for a project i am working on – sam Jan 15 '13 at 13:14
  • These is not much we can do if you don't tell us which program you are trying to use and which version of the library you are working with. Without those information, all I can say is "your module is not installed correctly" ;) – Cynical Jan 15 '13 at 13:20
  • 1
    @IgnacioVazquez-Abrams out of curiosity - which software do you refer here as "dead"? python2.7? mod_python? ubuntu12? – mishik Jun 19 '14 at 06:16

1 Answers1

0

_apache is installed by the mod_python module when it is loaded by Apache at startup. Thus, only scripts which are executing under mod_python will actually be able to import it.

Nowakus
  • 571
  • 4
  • 7