Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > problem with mod_python

Reply
Thread Tools

problem with mod_python

 
 
Pradnyesh Sawant
Guest
Posts: n/a
 
      02-17-2008
Hello,
I have a small program which does 'import hashlib'. This program runs fine
with python2.5. But when I try running the same program through mod_python,
I get the error: 'ImportError: No module named hashlib' in the apache2
error.log

Searching online suggested me to include md5.so or md5module.so in apache2.
but I don't see that in a package for debian lenny (the system I'm using).

So, my Q is, is it possible to make mod_python use the same PYTHONPATH as
the python2.5 interpreter? if so, how?

any other suggestions to solve the above problem are welcome too.
thanks!
--
warm regards,
Pradnyesh Sawant
--
We are not just our behaviour. We are the person managing our behaviour.
--The One Minute Manager

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHt7gbL6rhPByZNPcRAlkQAKCQ4gb6Nth4DbaRFLpdyS CfLFRUtgCeMpr0
icx5lyIChD6maTLZyYg7w3g=
=nrpp
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
 
Arnaud Delobelle
Guest
Posts: n/a
 
      02-17-2008


Pradnyesh Sawant wrote:
> Hello,


Hi

[...]
> So, my Q is, is it possible to make mod_python use the same PYTHONPATH as
> the python2.5 interpreter? if so, how?


You can use the PythonPath directive to set the PYTHONPATH to whatever
you want

> any other suggestions to solve the above problem are welcome too.
> thanks!


Have you tried the mod_python mailing list? (see http://www.modpython.org/)

--
Arnaud

 
Reply With Quote
 
 
 
 
Graham Dumpleton
Guest
Posts: n/a
 
      02-17-2008
On Feb 17, 3:29*pm, Pradnyesh Sawant <spra...@gmail.com> wrote:
> Hello,
> I have a small program which does 'import hashlib'. This program runs fine
> with python2.5. But when I try running the same program through mod_python,
> I get the error: 'ImportError: No module named hashlib' in the apache2
> error.log
>
> Searching online suggested me to include md5.so or md5module.so in apache2..
> but I don't see that in a package for debian lenny (the system I'm using).
>
> So, my Q is, is it possible to make mod_python use the same PYTHONPATH as
> the python2.5 interpreter? if so, how?
>
> any other suggestions to solve the above problem are welcome too.
> thanks!


Your mod_python isn't compiled against Python 2.5 but is using an
older version. You will need to rebuild mod_python to use Python 2.5
instead. You cannot just point mod_python at the Python 2.5 module
directories as they are incompatible.

Graham

 
Reply With Quote
 
Pradnyesh Sawant
Guest
Posts: n/a
 
      02-17-2008
On 02:07, 17Feb2008, Graham Dumpleton wrote:
> On Feb 17, 3:29*pm, Pradnyesh Sawant wrote:
> > Hello,

>
> Your mod_python isn't compiled against Python 2.5 but is using an
> older version. You will need to rebuild mod_python to use Python 2.5
> instead. You cannot just point mod_python at the Python 2.5 module
> directories as they are incompatible.


Thanks a lot! You were correct in pointing out the problem. I've found out
that hashlib is present in python2.5, and not in python2.4. I've decided to
go with python2.4, for the present, and use 'md5' instead of 'hashlib.md5'.
thanks again!

>
> Graham
>
> --
> http://mail.python.org/mailman/listinfo/python-list


--
warm regards,
Pradnyesh Sawant
--
We are not just our behaviour. We are the person managing our behaviour.
--The One Minute Manager

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHuBp2L6rhPByZNPcRAiGZAJ9HezI6YmtU0ndhx2FGq5 TIOnRymQCdFX4d
rU5iHqcqMsJJO2CQgKy820c=
=ovMb
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_python.so is garbled mod_python.so is garbled blbmdsmith Python 1 12-14-2006 12:15 AM
MySQLdb problem with mod_python, please help ws Wang Python 2 11-30-2004 08:40 PM
mod_python problem Gandalf Python 3 05-07-2004 11:38 AM
Problem with mod_python and 4Suite Doug Farrell Python 2 08-12-2003 12:21 PM
Mod_python xml parsing problem Mike Medland Python 0 07-01-2003 08:08 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57