

Use below set of commands to compile Python source code on your system using altinstall. You can also download latest version in place of specified below.
#INSTALL PYTHON 2.7 UBUNTU AND CENTOS INSTALL#
Sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-devĭownload Python using following command from python official site. The altinstall command instructs the system to create a second installation of this version of Python. The make command builds the installer package.
#INSTALL PYTHON 2.7 UBUNTU AND CENTOS HOW TO#
curl python2.7 - To learn about how to use pip, please refer to the article on Common Python Tools: Using virtualenv, Installing with Pip, and Managing Packages. Install Python 2.7 Obtain a recent libstdc++ Installing Python 2.7. Let’s download the setup files for pip and have Python (2.7) install it: This will install it for version 2.7.6. We also need to be obtaining a recent version of libstdc++. Unfortunately when using YUM to install Tkinter, it installs it for the default python installation of python 2.6. The situation with Centos 6 is somewhat complicated since Centos 6 ships with Python 2.6 which is not compatible. I need to install Tkinter for python 2.7. Sudo apt-get install build-essential checkinstall Once in the Python directory, compile the source code into an installation package with the following two commands. I've setup my system with an alternative installation of python, specifically python 2.7.7.


Execute the following commands on your system to install all required dependencies to build Python 2.7. You must have installed the following prerequisites on your system. How to Install Python 3.4 on Ubuntu & LinuxMint.To install Python 3.4.5 visit following article. At writing time of this article Python 3.4.5 latest stable version is available to download and install. You can also use it to install the latest version of Python 3 on CentOS 7. This article will help you to install Python 2.7.18 on your Ubuntu, Debian and LinuxMint operating systems. This tutorial will show you how to install the latest version of Python 2 and Python 3 on CentOS 6.
