© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public
Setting Up a Virtual Environment
DevNet$ pip install virtualenv
Successfully installed virtualenv
DevNet$ virtualenv venv
New python executable in
/private/tmp/venv/bin/python2.7
Also creating executable in
/private/tmp/venv/bin/python
Installing setuptools, pip, wheel...done.
DevNet$ virtualenv venv2 --python=python3
Running virtualenv with interpreter
/usr/local/bin/python3
Using base prefix
'/usr/local/Cellar/python3/3.6.2/Frameworks/Python.fr
amework/Versions/3.6'
New python executable in
/private/tmp/venv2/bin/python3.6
Also creating executable in
/private/tmp/venv2/bin/python
Installing setuptools, pip, wheel...done.
DevNet$ source venv/bin/activate
(venv) DevNet$
* Commands on Windows Platforms slightly different
• Install the virtualenv library
• pip install virtualenv
• Create the Virtual Environment
• virtualenv name
• Specify Python Version
• virtualenv name --python=python3
• Activate Virtual Environment
• source name/bin/activate*
• Deactivate Virtual Environment
• deactivate
DEVNET-1893.c
42