Skip to content

Instantly share code, notes, and snippets.

@saleh-old
Created June 17, 2020 15:51
Show Gist options
  • Save saleh-old/234f28d187f66a89e3660098bee31f78 to your computer and use it in GitHub Desktop.
Save saleh-old/234f28d187f66a89e3660098bee31f78 to your computer and use it in GitHub Desktop.
Environment setup for Python on a Ubuntu 18.04 machine
echo "updaing ubuntu..."
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install git -y
# python 3.8
echo "installing Python 3.8 ..."
sudo apt-get -y install gcc binutils
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update -y
sudo apt-get -y install python-pip
sudo apt-get -y install python-setuptools
sudo apt-get -y install build-essential python3.8-dev
sudo apt-get update
sudo apt-get install build-essential
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 9
sudo update-alternatives --set python /usr/bin/python3.8
echo "Python 3.8 has been set as default python"
sudo apt-get -y install python-dev
sudo apt-get -y install python3-pip
python -m pip install --upgrade pip
hash -d pip
pip install -U setuptools
pip install --upgrade setuptools
pip install ez_setup
pip install Cython numpy
echo "Here's the output of 'python --version' (it should be 'Python 3.8.*'):"
python --version
echo "Here's the output of 'pip --version':"
pip --version
# install screen
echo "installing screen..."
sudo apt-get install -y screen
# install oh zsh
echo "installing oh zsh..."
sudo apt-get install -y zsh && sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment