Installation¶
Virtual Environments
We recommend that you create a virtual environment (using venv, Conda, uv, Poetry, etc.).
FlyGym is published on the Python Package Index (PyPI). You can use FlyGym using pip directly. If you only care about the basic functionalities:
Add the warp optional dependency if you want to use fly.warp with GPU acceleration:
Add the examples optional dependency if you want to follow the tutorials:
You can combine multiple optional dependencies in one command. For example:
FlyGym uses uv for package management. Install uv following its official documentation.
Clone the FlyGym repository:
Then install using uv. The following installs all optional dependencies, but you can
- remove
--extra warpif you don't care for GPU acceleration, or if you don't have a NVIDIA GPU (e.g., you're on a Mac), - remove
--extra devif you don't care for development tools (e.g., unit testing, automatic doc generation), or - remove
--extra examplesif you don't care for running the tutorials.
Note
Developers should also install the nbstripout filter, which removes bulky Jupyter Notebook outputs upon git add (without touching the actual files—the outputs are only removed in the version-controled files). Note that this does not integrate well with IDEs, so you should run git add <files> in command line instead of using, for example, the GUI in VS Code.
Forthcoming.
Forthcoming.
Special notes for rendering on machines without a display
If you are using a machine without a display (e.g. a server), you will need to change the renderer to EGL (see this link for details). This requires setting the following environment variables before running FlyGym:
If you want to change this setting by default, you can add the two lines above to the end of your .bashrc file.
If you are using a Conda environment, you can change the environment variables as follows (replacing my-env-name accordingly), and then re-activate the environment:
You might need to install EGL-related dependencies on your machine. For example, on some Ubuntu/Debian systems, you might need to install the following: