Monday, April 25, 2016

How to upgrade from python 2.7 to 3.5 linux mint, Ubuntu or any other linux distro

1. First install build Dependencies

sudo apt-get install build-essential checkinstall sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev


2. cd into your download folder

cd ~/Download

3. download Python 3.5 using wget / or you can download manually

wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz

extract Python zip folder using tar zxvf(zip extract verbose file) command

tar zxvf Python-3.5.0.tgz

Now cd into the Python-3.5.0

cd Python-3.5.0

Now install python by following command ./configure 
sudo make install

now make a bash_alias file

gedit .bash_aliases 

Now define the source

source .bash_aliases
Now check python version
python --version

No comments:

Post a Comment

css snippet for blogger code highlighting

code, .code {     display: block;     background: beige;     padding: 10px;     margin: 8px 15px; }