Created
April 4, 2024 01:41
-
-
Save VeryDampTowel/f11a9ddcb6dd40a6225d085601abecb6 to your computer and use it in GitHub Desktop.
Install Python3.10
This file contains hidden or 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
| # Make sure we're up to date first... | |
| sudo apt update && sudo apt upgrade -y | |
| # Dependencies | |
| sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev | |
| # Let's work in a new directory | |
| mkdir installPython ; cd installPython | |
| # Download Python3.10 Tar | |
| wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz | |
| # Open the present | |
| tar -xf Python-3.10.*.tgz | |
| # Dependency check | |
| cd Python-3.10.*/ | |
| ./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" | |
| # Install Python3.10 | |
| make -j $(nproc) | |
| sudo make altinstall | |
| # Confirm it works! | |
| python3.10 --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment