Created
May 28, 2021 21:42
-
-
Save bobby569/a64325fa467143850d2b7976e639c6fd to your computer and use it in GitHub Desktop.
Scripts to install python on linux
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
| #!/bin/bash | |
| VERSION=$1 | |
| sudo apt update | |
| sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev | |
| curl -O https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz | |
| tar -xf Python-$VERSION.tar.xz | |
| cd Python-$VERSION | |
| ./configure --enable-optimizations | |
| make -j 8 # number of core, 8 by default | |
| sudo make altinstall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment