Tag Archives: Python

Install the AWS CLI with virtualenv on Gentoo

First download virtualenv:

wget -O virtualenv-15.0.3.tar.gz https://github.com/pypa/virtualenv/archive/15.0.3.tar.gz

Extract virtualenv:

tar xvf virtualenv-15.0.3.tar.gz

Create the environment:

python3 virtualenv-15.0.3/virtualenv.py --system-site-packages ~/awscli-ve/

Alternatively, you can use the -p option to specify a version of Python other than the default:

python3 virtualenv-15.0.3/virtualenv.py --system-site-packages -p /usr/bin/python3.4 ~/awscli-ve

Activate your new virtual environment:

source ~/awscli-ve/bin/activate

Install the AWS CLI into your virtual environment:

(awscli-ve)~$ pip install --upgrade awscli

To exit your virtualenv:

deactivate