Skip to content

Virtualenv

Rolando Islas edited this page May 1, 2017 · 6 revisions

A virtualenv will allow you to install python packages that will be separate from system and other virtualenv packages. This is useful for maintaining program specific dependencies.

Install virtualenv

python3 -m pip install virtualenv

Create Virtualenv

This will create a virtual environment in the directory you specify.

python3 -m virtualenv -p python3 /path/to/virtualenv/directory

Activate Virtualenv

source /path/to/virtualenv/directory/bin/activate

You can now install drc-sim into the virtualenv.

Running in virtualenv

If not running a shell session as root the virtualenv's python must be used with sudo.

Example:

sudo /path/to/virtualenv/directory/bin/python3 setup.py install

sudo /path/to/virtualenv/directory/bin/python3 drc-sim-backend.py

Clone this wiki locally