Update Python on LE 4.0 (Ubuntu 10)

2

Hello

I need to use SimpleHttpServer and only have it for Python 2.6.6 and above and LE 4.0 is Python 2.6.5.

As it does not have software center (at least I did not find) I tried this code in the terminal but it gave several errors:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.7 

Someone would know how to update python even if it is 2.6.6.

Thank you

    
asked by anonymous 11.09.2016 / 13:13

3 answers

1

Of course Ubuntu 10 is already quite old and I do not have one available to test, but you should rather be able to install Python 2.7 side by side with the Python standard system. The important thing is not to try to replace the default Python with 2.7 because the various parts of the system will stop working.

Try this:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB82666C
sudo apt-get update
sudo apt-get install python2.7 python2.7-dev

Verify that Python 2.7 has been installed and is in the PATH:

python2.7 --version

If this printed version 2.7.x, then it worked. Also check that the default version of the system continues to the previous one:

python --version

You can now install easy_install-2.7 and pip-2.7:

curl http://python-distribute.org/distribute_setup.py | sudo python2.7 -
easy_install-2.7 pip
    
12.09.2016 / 20:57
0

What is "LE 4.0"?

The name of the module is SimpleHTTPServer (note the upper case) and it does exist in Python 2.6.5.

link

    
12.09.2016 / 04:55
0

If you change Python _the_system_ by changing the minor-version, you will basically initlizar your system and need to reformat. Updates of the microversion (from 2.6.5 to 2.6.6) should work automatically with apt-get if your aina system is maintained. Note that Python 2.6 is something really old, more than 10 years old.

If you need to maintain a server with this age without an update, the recommendation is to compile Python independently, and use virtualenv for any project involving Python]

In addition, SimpleHTTPServer is available in Python version 2.6.

    
12.09.2016 / 10:45