This question already has an answer here:
It's my first time using ubuntu so I don't know how to use it very well yet... How can i install python 3.5.2 ? It has already the version 2.7.12 . My Ubuntu version is Ubuntu 16.04 LTS (desktop).
|
This question already has an answer here: It's my first time using ubuntu so I don't know how to use it very well yet... How can i install python 3.5.2 ? It has already the version 2.7.12 . My Ubuntu version is Ubuntu 16.04 LTS (desktop). |
|||
marked as duplicate by Eliah Kagan, Zanna, David Foerster, Eric Carvalho, waltinator Jan 3 '17 at 4:03This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||
|
Basic process:
If you want a very specific version:
|
|||||||||||||||||||||
|
|
As you must have already noticed that Ubuntu 16.04 has 'python 2.7.12' by default. To check the default python version, run below line
it should return 'Python 2.7.12' It is recommended that we don't try to modify/uninstall this default package of python because there could be many other system files/applications depending on it, and it might create some unexpected errors or issues if we uninstall this default python package. So, to use the latest version of python, it would be better to go for creating a virtual environment ('virtualenv'). This is a module inside python which facilitates us to use multiple python versions on the same system. Step-1: First install python3 -
Step-2: Now install 'virtualenv'-
Step-3: Now set the path of virtualenv to your desired directory. lets first create a desired directory-
it will create a folder in the current directory with the name 'MYENV' Step-4: set the path of virtualenv to the created(desired) directory-
Step-5: Activate the virtualenv
done.. you should be able to get (MYENV) as prefix in the terminal command line. Now run below command
it should return 'python 3.5.2' |
|||||||||
|
python3... – Zanna Jul 13 '16 at 11:423.5.1-3on my system – grooveplex Jul 13 '16 at 12:11sudo apt install idle3) if the book recommends) – Zanna Jul 13 '16 at 13:46