Skip to content

Instantly share code, notes, and snippets.

Created May 1, 2017 06:58
  • Star 19 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Build Python 3.6 from source for Ubuntu and Debian
Prerequisties install:
- sudo apt-get install build-essential checkinstall
These are the dependancies required by python:
- sudo apt-get install libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev
Download the tar source file from (at the time of writing 3.6.1 is the latest release):
- wget -O ~/Downloads/python3.6.1.tgz
Via command line navigate to the downloaded file directory:
- cd ~/Downloads/
Untar the downloaded file:
- tar -zxvf python3.6.1.tgz
Via commandline navigate to the newly extracted file:
cd python3.6.1/
Compiling the code:
- ./configure
- sudo make altinstall
Altinstall will make sure default python on your machine is not touched.
You can run python3.6 from commandline via the command python3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment