Python 3.6 on Ubuntu 16.04

On Ubuntu 16.04, there is a version of Python installed by default.

You should not uninstall it or it will break your machine.

Install Python 3.6

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

Now you can use python 3.6. Check the version by using

python3.6 -V

Install pip for Python 3.6

curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6

Now pip is installed for Python3.6 and can be used to add package to this interpreter.

Install package for Python 3.6

sudo python3.6 -m pip install Flask

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s