Created
June 2, 2020 14:40
-
-
Save Wombatpm/94feaed416733185f53d69688255792c to your computer and use it in GitHub Desktop.
Build Python3 from source for Ubuntu Xenial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#At a shell prompt (in a terminal), run | |
sudo apt-get update \ | |
&& sudo apt-get install -y build-essential git libexpat1-dev libssl-dev zlib1g-dev \ | |
libncurses5-dev libbz2-dev liblzma-dev \ | |
libsqlite3-dev libffi-dev tcl-dev linux-headers-generic libgdbm-dev \ | |
libreadline-dev tk tk-dev wget | |
git clone https://github.com/python/cpython.git | |
cd cpython && ./configure --prefix=/usr \ | |
--enable-loadable-sqlite-extensions \ | |
--enable-shared \ | |
--with-lto \ | |
--enable-optimizations \ | |
--with-system-expat \ | |
--with-system-ffi \ | |
--enable-ipv6 --with-threads --with-pydebug --disable-rpath \ | |
&& make \ | |
&& sudo make altinstall | |
#This will fetch all the common packages you need to build anything (e.g. the compiler etc.). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment