Upgrade from Python 2.4 to 2.5

2007-05-07 Thread RollyF

I am using fedora 6 distribution which comes with Python 2.4.3. I then
installed Python 2.5.1 and re-installed the  packages I needed for my
application. I verified that at the terminal, when I typed in
"python", what's loaded is Python 2.5. I am runnign apache2 and
mod_python. I recompiled and installed mod_python to python 2.5. When
I run my application, it's coming back with:

>>>
Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line
1202, in _process_target
module = import_module(module_name, path=path)

  File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line
304, in import_module
return __import__(module_name, {}, {}, ['*'])

ImportError: No module named django.core.handlers.modpython
>>>

How do I configure Apache2 or mod_python to use Python 2.5?

TIA,
Rolly


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald

On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote:
> How do I configure Apache2 or mod_python to use Python 2.5?

Adjust your paths so the place where you installed your new Python 2.5
is ahead of your old Python's path.


-- 
Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread RollyF

Greg,

Thank you for the quick reply. I got the following while checking the
path:

>>>
[EMAIL PROTECTED] ~]$ python
Python 2.5.1 (r251:54863, May  4 2007, 14:56:43)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/
local/lib/python2.5/plat-linux2', '/usr/local/lib/python2.5/lib-tk', '/
usr/local/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-
packages']
>>>
[EMAIL PROTECTED] ~]$ $PATH
-bash: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rxferoli/
bin: No such file or directory
>>>

[EMAIL PROTECTED] ~]$ whereis python
python: /usr/bin/python /usr/bin/python2.4 /usr/lib/python2.4 /usr/
local/bin/python /usr/local/bin/python2.5-config /usr/local/bin/
python2.5 /usr/local/lib/python2.5 /usr/include/python2.4 /usr/share/
man/man1/python.1.gz


I am a linux and python newbie so I appreciate this hand-holding for
now. I am a bit confused. The sys.path is showing no signs of
python2.4, the $PATH is fist listing /usr/local/bin where python2.5 is
located; but whereis is definitely showing python2.4 first. Where
should I go to adjust this?

Thanks,

- rolly



On May 7, 9:39 am, "Greg Donald" <[EMAIL PROTECTED]> wrote:
> On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote:
>
> > How do I configure Apache2 or mod_python to use Python 2.5?
>
> Adjust your paths so the place where you installed your new Python 2.5
> is ahead of your old Python's path.
>
> --
> Greg Donaldhttp://destiney.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald

On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] ~]$ python
> Python 2.5.1 (r251:54863, May  4 2007, 14:56:43)

Seems like the correct Python is in your path already.

> [EMAIL PROTECTED] ~]$ $PATH
> -bash: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rxferoli/
> bin: No such file or directory

echo $PATH is probably what you want.

> [EMAIL PROTECTED] ~]$ whereis python

whereis just consults the locate database.  Try `which python`
instead, it searches your PATH.

> I am a linux and python newbie so I appreciate this hand-holding for
> now. I am a bit confused. The sys.path is showing no signs of
> python2.4, the $PATH is fist listing /usr/local/bin where python2.5 is
> located; but whereis is definitely showing python2.4 first. Where
> should I go to adjust this?

If you want to rely on whereis you have to make sure your locate
database is up to date.  Run `updatedb` when in doubt.

Some other things to check:

Did you restart Apache?

Are you compiling a new Python from source?  If so did you add the
Python libs path to your ld.so.config?  Did you run ldconfig?


-- 
Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Jeremy Dunck

On 5/7/07, Greg Donald <[EMAIL PROTECTED]> wrote:
...
>
> Are you compiling a new Python from source?  If so did you add the
> Python libs path to your ld.so.config?  Did you run ldconfig?

Is apache running as the same user as you, and if not, is it locating
your 2.5 on the path?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread RollyF

Greg,

Thank you again. This is very informative.

"which python" returns

/usr/local/bin/python

which is the location of python2.5

I restarted Apache several times using "/etc/init.d/httpd restart",
including a hard reboot of the server.

I originally recompiled Python from source using:
  ./configure
  make
  make install

I run "/sbin/ldconfig -v" and restarted Apache again. Still showing
the same python2.4 exception when I run the application.
I am not sure what to put in ld.so.config. I saw a couple of
references to python2.4 libs while in verbose mode of running
ldconfig.

Thanks,
rolly

On May 7, 11:18 am, "Greg Donald" <[EMAIL PROTECTED]> wrote:
> On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] ~]$ python
> > Python 2.5.1 (r251:54863, May  4 2007, 14:56:43)
>
> Seems like the correct Python is in your path already.
>
> > [EMAIL PROTECTED] ~]$ $PATH
> > -bash: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rxferoli/
> > bin: No such file or directory
>
> echo $PATH is probably what you want.
>
> > [EMAIL PROTECTED] ~]$ whereis python
>
> whereis just consults the locate database.  Try `which python`
> instead, it searches your PATH.
>
> > I am a linux and python newbie so I appreciate this hand-holding for
> > now. I am a bit confused. The sys.path is showing no signs of
> > python2.4, the $PATH is fist listing /usr/local/bin where python2.5 is
> > located; but whereis is definitely showing python2.4 first. Where
> > should I go to adjust this?
>
> If you want to rely on whereis you have to make sure your locate
> database is up to date.  Run `updatedb` when in doubt.
>
> Some other things to check:
>
> Did you restart Apache?
>
> Are you compiling a new Python from source?  If so did you add the
> Python libs path to your ld.so.config?  Did you run ldconfig?
>
> --
> Greg Donaldhttp://destiney.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald

On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote:
> I run "/sbin/ldconfig -v" and restarted Apache again. Still showing
> the same python2.4 exception when I run the application.
> I am not sure what to put in ld.so.config. I saw a couple of
> references to python2.4 libs while in verbose mode of running
> ldconfig.

You wanna put the libs path of your new python install in there,
something like /usr/local/python2.5/lib or whatever yours is exactly.
After that run ldconfig so your system knows to look there for shared
libraries from now on.


-- 
Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Sam Morris

On Mon, 07 May 2007 09:19:58 -0700, RollyF wrote:

> I am using fedora 6 distribution which comes with Python 2.4.3. I then
> installed Python 2.5.1 and re-installed the  packages I needed for my
> application. I verified that at the terminal, when I typed in "python",
> what's loaded is Python 2.5. I am runnign apache2 and mod_python. I
> recompiled and installed mod_python to python 2.5. When I run my
> application, it's coming back with:
>
> ...
>
> How do I configure Apache2 or mod_python to use Python 2.5?

The packages that Fedora provide will use the system's python 2.4 
libraries and modules. To change this, you will need to rebuild 
mod_python against your python2.5 installation. There are many ways to go 
about this, someone more familiar with Fedora might be able to help you 
with the specifics, but broadly:

 1. Remove the existing package of mod_python that is installed
 2. Grab the mod_python sources from 
 3. Follow the installation instructions at . Make sure you tell mod_python's 
configure script where to find your local installation of python2.5 by 
using an option like: --with-python=/usr/local/bin/python.

-- 
Sam Morris
http://robots.org.uk/

PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---