Skip to content

Instantly share code, notes, and snippets.

@mattseymour
Created May 1, 2017 06:58
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mattseymour/08456b01c467859fba625ba5711fa08e to your computer and use it in GitHub Desktop.
Save mattseymour/08456b01c467859fba625ba5711fa08e to your computer and use it in GitHub Desktop.
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 python.org (at the time of writing 3.6.1 is the latest release):
- wget -O ~/Downloads/python3.6.1.tgz https://www.python.org/ftp/python/3.6.1/Python-3.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