This article will help you to install Python 3.5.6 on Ubuntu and Linuxmint operating system. To know more about this version visit Python official website.

Step 1 – Prerequsites

You must have fulfilled all the prerequisites for installing Python on Ubuntu and Linuxmint. Use the following command to install all the prerequisites. After that go for the Python installation on Ubuntu.

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

Step 2 – Download Python 3.5

Download Python source code archive from its official download website. You can also download Python 3.5 version using the following commands.

cd /usr/src
wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz

Now extract the downloaded archive on your system.

sudo tar xzf Python-3.5.6.tgz

Step 3 – Install Python on Linux

Use below set of commands to compile Python source code on your system using altinstall. This will install Python on an Ubuntu and LinuxMint system.

cd Python-3.5.6
sudo ./configure --enable-optimizations
sudo make altinstall

make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Step 4 – Check the Python Version

You have successfully installed Python on Linux. Check the Python version installed using the command:

# python3.5 -V

Python 3.5.6

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据