Skip to content

Instantly share code, notes, and snippets.

@a1mzone
Last active January 5, 2024 08:27
Show Gist options
  • Save a1mzone/c73ac08c84eeebba75f06b51fc843f48 to your computer and use it in GitHub Desktop.
Save a1mzone/c73ac08c84eeebba75f06b51fc843f48 to your computer and use it in GitHub Desktop.
Python

Python

Compile

git clone https://github.com/python/cpython
git checkout <version>

./configure --enable-optimizations
make -j8
sudo make altinstall

Install Precompiled on Ubuntu

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

Add & Update Default

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 2 sudo update-alternatives --config python3

Virtualenv Wrapper

sudo apt install virtualenvwrapper
sudo find / -name "virtualenvwrapper.sh"
mkvirtualenv -p python<version> <name>
workon <name>
deacative
rmvirtualenv <name>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment