Skip to content

Instantly share code, notes, and snippets.

@MrAmbiG
Created November 2, 2018 14:52
Show Gist options
  • Save MrAmbiG/a62448f79331d9a488d91e3dbd0506bc to your computer and use it in GitHub Desktop.
Save MrAmbiG/a62448f79331d9a488d91e3dbd0506bc to your computer and use it in GitHub Desktop.
#install the centos7 repository
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
#install python3.6
sudo yum -y install python36u
# install pip3 for python 3.x (since pip is for python 2.x)
sudo yum -y install python36u-pip
# it shows the default python 2.x
python -V
# this is how you run the python 3.x but it is inconvenient
python3.6 -V
# so set alias
# when we run python the OS will not autotranslate that the alias value python3.6
alias python=python3.6
alias pip=pip3.6
# make these alias changes permanent
source ~/.bashrc
# install virtualenv
pip install virtualenv
# how to create a virtual environment for python3?
# virtualenv <name of the virtual environment>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment