How do I install python 3.5.2 ubuntu 2017 (1 Viewer)

how install python 3 on ubuntu :) $ python -V it should return 'Python 2.7.12' It is recommended that we don't try to modify/uninstall this default package of python...

how install python 3 on ubuntu :)


$ python -V

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 -

$ sudo apt-get update
$ sudo apt-get install python3

Step-2: Now install 'virtualenv'-

$ pip install virtualenv

Step-3: Now set the path of virtualenv to your desired directory. lets first create a desired directory-

$ mkdir MYENV

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-

$ sudo virtualenv -p python3 MYENV

Step-5: Activate the virtualenv

$ source MYENV/bin/activate

done.. you should be able to get (MYENV) as prefix in the terminal command line. Now run below command

$ python -V

it should return 'python 3.5.2'


 
💬 SpyHackerz Telegram — Anlık tartışmalar ve duyurular için katıl

Users who are viewing this thread

133,331Konular
3,282,785Mesajlar
319,326Kullanıcılar
xgetto2005Son Üye
Üst Alt