Skip to content

Install with pip

Yunlong edited this page Mar 30, 2021 · 19 revisions

Prerequisites

If you did not do it already, please install the following packages.

sudo apt-get update && apt-get install -y --no-install-recommends \
   build-essential \
   cmake \
   libzmqpp-dev \
   libopencv-dev 

Python environment

It is a good idea to use virtual environments (virtualenvs) or Anaconda to make sure packages from different projects do not interfere with each other. Check here for Anaconda installation.

  1. To create an environment with python3.6
conda create --name ENVNAME python=3.6
  1. Activate a named Conda environment
conda activate ENVNAME

Install Flightmare

Clone the project to your desktop (or any other directory)

cd ~/Desktop
git clone https://github.com/uzh-rpg/flightmare.git

Add Environment Variable

Add FLIGHTMARE_PATH environment variable to your .bashrc file:

echo "export FLIGHTMARE_PATH=~/Desktop/flightmare" >> ~/.bashrc
source ~/.bashrc

Install dependencies

conda activate ENVNAME
cd flightmare/
# install tensorflow GPU (for non-gpu user, use pip install tensorflow==1.14)
pip install tensorflow-gpu==1.14
 
# install scikit
pip install scikit-build

Install flighmare (flightlib)

cd flightmare/flightlib
# it first compile the flightlib and then install it as a python package.
pip install .

After installing flightlib, you can following the Basic Usage with Python for some Reinforcement learning examples.