473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem with mod_python

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-----

Feb 17 '08 #1
3 1430


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

Feb 17 '08 #2
On Feb 17, 3:29*pm, Pradnyesh Sawant <spra...@gmail.comwrote:
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

Feb 17 '08 #3
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-----

Feb 17 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ws Wang | last post by:
MySQLdb is working fine at command line, however when I tried to use it with mod_python, it give me a "server not initialized" error. This is working fine: ----------------------- testmy.py...
1
by: py.adriano | last post by:
Hi folks... I'm getting a weird problem while loading psp module from mod_python. It only happen somethimes, and I just can't figure out why. I saw other threads in other lists over the net, but...
1
by: neha | last post by:
hi, i m trying to integrate python with apache on linux.For this i m using mod_python. I dont see any problem with the versions of python,apache and mod_python i m using. the versions i m using...
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
1
by: boney | last post by:
hello All, I am totally unknown to python language.. i need to install mod_python to embed python interpreter with the Apache server, in order to use Trac with Apache Web Server i am using...
1
by: wadacom | last post by:
I'm sorry to take your time for newbie problems but I've been searching what to do about the problem with my apache server I have. I work with ubuntu dapperdrake I put the last apache server on it...
3
by: rmompo | last post by:
Hi, im new at Python and i'm having problems putting it online. this is the plataform: Windows XP Professional SP2 Apache/2.2.4 (Win32)...
1
by: NccWarp9 | last post by:
Hello, im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on Windows and having truble starting pythone, any help would be appreciated .. Im getting this error: ...
3
by: Lawrence D'Oliveiro | last post by:
In message <mailman.109.1216158151.922.python-list@python.org>, Cyril Bazin wrote: What's the error message? This should be in Apache's error_log file.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.