Last update: 2018-04-19

Installing multiple Python versions

Compiling a new version

tar xzvf Python-3.6.0.tgz
cd Python-3.6.0/
./configure --prefix=/usr/local/python/python3.6
make altinstall

Installing pip

/usr/local/python3.6/bin/python3.6 --prefix=/usr/local/python/python3.6/

Installing a module

/usr/local/python/python3.6/bin/pip3 install argcomplete

Compiling Python with an alternate library path

You can edit Modules/Setup.dist with the proper paths, for example the SSL section for a different OpenSSL binary. Then, set the LDFLAGS variable and copy the dist file:

cp Modules/Setup.dist Modules/Setup
export LDFLAGS="-Wl,-rpath,/your/library/path"

You can then run make to compile Python.

© 2007-2018 Patrick Lambert - All resources on this site are provided under the MIT License - You can contact me at: