python3
This is an old revision of the document!
Table of Contents
Python3
If I want Python 3.6, I have to compile it myself. Use “dnf” for RedHat based distros and “apt-get” for Debian.
RedHat based distros
sudo dnf install readline-devel # or up-arrow won't navigate history sudo dnf install sqlite-devel openssl-devel bzip2-devel sudo dnf install xz-devel
Then on Fedora and macOS…
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz tar -xvf Python-3.6.0.tgz cd Python-3.6.0/ ./configure --prefix=/opt/python3 make sudo make install # sudo ln -s /opt/python3/bin/python3 /usr/bin/python3
Debian based distros
For Debian (eg., Rasbian) try the following (on raspberry pi libssl-dev isn't available):
sudo apt-get install build-essential libncursesw5-dev libreadline-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev tk-dev
On Raspbian, I put it in the default location:
cd Python-3.6.0/ ./configure make sudo make install
python3.1486322752.txt.gz · Last modified: 2023/04/12 20:44 (external edit)