Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.08 KB

python.org

File metadata and controls

40 lines (29 loc) · 1.08 KB

python

Usually build python from scratch.

This will install the required libraries:

sudo apt install libssl-dev zlib1g-dev libbz2-dev ncurses-dev uuid-dev
sudo apt install build-essential libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev libffi-dev tk-dev
sudo apt install libsqlite3-dev liblzma-dev lzma-dev libgdbm-compat-dev lzma

Python 3

Current release found at https://python.org

wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tar.xz

Build python and install it into a user directory:

./configure --prefix=$HOME/sw --enable-shared --enable-optimizations --with-ensurepip=upgrade
make -j12
make install

Python 2.7

It was end of life on 1 Jan 2020, but it’s still a zombie.

https://www.python.org/downloads/release/python-2718/
#end_src

I always had problems building python 2.x with more than one thread.

./configure --prefix=$HOME/sw --enable-optimizations --with-ensurepip=yes --enable-shared LDFLAGS=-Wl,-rpath=/home/apn/sw/lib
make