Skip to content

Instantly share code, notes, and snippets.

@CoffieldWeb
Last active March 29, 2024 14:51
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CoffieldWeb/dfac9b6600700be8623b49f2aae23db5 to your computer and use it in GitHub Desktop.
Save CoffieldWeb/dfac9b6600700be8623b49f2aae23db5 to your computer and use it in GitHub Desktop.
Install Python 3, Pip 3, and Virtualenv in AWS Amazon Linux 2

How to install python 3, pip 3, and virtualenv in AWS Amazon Linux 2:

Update All Packages

sudo yum update

Install pip 3 and python 3

sudo yum install python3 pip3

Then install virtualenv using pip3

sudo pip3 install virtualenv 

Now create a virtual environment (will create folder)

virtualenv your_project_name

You can also use a Python interpreter of your choice (currently ships with 2.7.16)

virtualenv -p /usr/bin/python your_project_name

Active your virtual environment:

source your_project_name/bin/activate

To deactivate:

deactivate

Read the article:

View this on Coffield Web

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