Feb 5, 2011 - Of particular importance is the fact that one of Ubuntu policies is to. Go and sudo apt-get install python3 and code for 3.x Python bravely; just.
Recent versions of Ubuntu come with Python 2.7.3 pre-installed. You can see which version you have by typing the command python
into your terminal. If you have version 2.7.3 then you will see the following output:
It is not really possible to uninstall Python 2.7.3 on Ubuntu, because so many of its applications depend on it. Instead, one needs to use an open source tool called pyenv, which makes it possible to manage multiple parallel Python installations.
To install pyenv, you need Git installed on your system. If you don't have it or are unsure whether you do, please install it using the following command in the terminal:
Before you can install pyenv, you need several dependencies. The following commands have been verified to properly set up your system on a newly installed Ubuntu 12.04.3:
Once you have all required dependencies, please follow pyenv's installation instructions. Please ensure to replace ~/.bash_profile
by ~/.bashrc
in steps 2 and 3, since you are on Ubuntu.
Finally, you need to configure pyenv to use Python 2.7.5 on your system. This can be done via the command:
If you have done everything correctly, then typing python
into the terminal window should now produce the following output:
This page was brought to you by Helium, a web automation library for Python (and other languages). Be sure to check it out!