First download the latest Python version. Here, my version is Python3.1.1. Then install it in the Ubuntu environment and switch to the Python file directory :. /configuremakemaketestsudomakeinstall may encounter several problems here. The first one is in. /configure, Ccompilercannotcreateexecutables may occur. To solve this problem, you can
First download the latest version of Python. Here, my version is Python 3.1.1. Then install it in the Ubuntu environment and switch to the Python file directory:
./Configure
Make
Make test
Sudo make install
There may be several problems here. The first one is in. /configure, C compiler cannot create executables may occur. To solve this problem, use the sudo apt-get install build-essential command to solve it.
Another problem is that, after the installation is complete, the Python command is used to test whether the installation is successful. If Python2.6 is pre-installed, the old version is still displayed. The reason is that -- prefit is not set during installation. It is installed in the/usr/local directory by default, and the/usr/binfile is still connected to the original Python version. Solution:
Sudo rm/usr/bin/python
Sudo ln/usr/local/python */usr/bin/python.