Skip to the content.

Installation in a virtual environment

Virtual environments allow you to install Python packages in an isolated environment. This is usually a good idea because it reduces the risk that you mess up your system’s Python packages by installing globally with pip. Additionally, you can have multiple environments in parallel that don’t interfere with each other.

virtualenv & virtualenvwrapper

virtualenvwrapper is highly recommended, it makes using virtual environments much more comfortable.

Below are installation instructions for Ubuntu. If you use any other OS, see the documentation for how to install it on your system:

virtualenvwrapper installation on Ubuntu

The following steps have been verified on Ubuntu 20. They probably also work on other Debian-based Linux distros.

Install virtualenv and virtualenvwrapper:

sudo apt install python3-virtualenvwrapper

Add setup code for virtualenvwrapper to your shell startup file:

echo "export WORKON_HOME=$HOME/.virtualenvs && source /usr/share/virtualenvwrapper/virtualenvwrapper.sh" >> ~/.bashrc

source ~/.bashrc

Setting up a virtualenv for evo

Once virtualenvwrapper is installed, we can create the virtual environment. The --system-site-packages flag is recommended if you are using ROS with evo: it enables to import ROS Python modules that are installed outside of the virtualenv on your system.

mkvirtualenv evaluation --system-site-packages

To activate the environment, type:

workon evaluation

Install evo and its dependencies inside the virtual environment:

pip install --ignore-installed evo --no-binary evo

# or alternatively from source:
cd <evo>  # go to evo base source folder that contains setup.py
pip install --ignore-installed --editable . --no-binary evo

Now, the package should be installed in the virtualenv and you can use it.

Check if evo is installed correctly by running:

evo

To leave the virtualenv, close the shell or type:

deactivate

(activate again with workon evaluation)

To delete the environment:

rmvirtualenv evaluation

Tab completion (UNIX / Bash)

Unfortunately, tab command completion with the argcomplete might not work immediately in a virtual environment. You might need to install argcomplete outside of your virtualenv and run activate-global-python-argcomplete to make it work globally on your machine.