i have updated my centos python2.4.3 to python 5.1

i followed the following process:

which python
/usr/bin/python
python -V
Python 2.4.3
cd /usr/local/src
wget http://www.python.org/ftp/python/2.5.1/Python-2.5.1.tgz
tar xvzf Python-2.5.1.tgz
make
make install
ls -l /usr/local/bin/python
mv /usr/bin/python /usr/bin/python-orig
ln -s /usr/local/bin/python /usr/bin/python
ls -l /usr/bin/python -> /usr/local/bin/python
python -V
Python 2.5.1

now when running python script i am getting the following error

import: unable to open X server `'.
./getsplicefa.py: line 2: try:: command not found
import: unable to open X server `'.
./getsplicefa.py: line 5: syntax error near unexpected token `except:'
./getsplicefa.py: line 5: `except:'

any help is appreciable

I think your computer tried to read the file with the shell. You should pass the command

$ python getsplicefa.py

instead of

$ ./getsplicefa.py

or perhaps put a line #!/usr/bin/env python at the top of your file.

thank you for your reply but now i am getting this error:

psyco not running
Traceback (most recent call last):
File "getsplicefa.py", line 8, in <module>
from cistematic.core import complement
ImportError: No module named cistematic.core

please help

Updating python installs only the python standard library, not other modules that were previously installed in your site-packages directory. You will have to reinstall these modules one by one. It seems that you need psyco and cystematic.

Also, I don't know centos, but usually on linux systems, there is a package manager to install software. I'm not sure you chose the best way to upgrade python.

i know that this will be very stupid question but i am a newbie so would you please tell me how to get these modules means psyco and cistematic.core

A google search with "cistematic python" leads to http://cistematic.caltech.edu/ . This page also contains a link to psyco.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.