Linux/WSL#
Depending on which distribution of Linux you use, the process of installing packages will look slightly different. Select the appropriate distribution below and follow along from there. These instructions also work for the Windows Subsystem for Linux (WSL).
Note
If you’re using Arch Linux or one of its derivatives, we assume you have the yay package manager installed to install dependencies from the AUR.
Update your system’s package manager (either ‘apt’ for Debian-based Linux or ‘pacman’ for Arch Linux variants), then install
gcc,git, and Python 3.10.Debian-based (e.g. Ubuntu):
sudo apt updatesudo apt install build-essential git python3.10Arch-based (e.g. Arch Linux, Manjaro, etc):
sudo pacman -Syusudo pacman -S gcc gityay -S python310If you’re using an NVIDIA GPU, install CUDA Toolkit 11.8 and cuDNN, and install Pytorch v2.0.1 with cu118 support.
First, install CUDA Toolkit 11.8. Select your version of Linux, then follow the instructions to install CUDA for your operating system.
Next, install cuDNN. You will need to register an NVIDIA Developer account, which you can do for free. You can choose cuDNN v8.9.7 that supports CUDA toolkit v11.8. Choose ‘Local Installer for Windows (Zip)’, download and extract it. And then copy the three folders ‘bin’, ‘lib’, and ‘include’ into where the CUDA toolkit is installed (typcially, ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8’), and replace all the three folders with the same names. After that, you may need to add the ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8’ to path via environmental variables.
Finally, install Pytorch v2.0.1 with cu118 support.
python3 -m pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118Install
pipif not already installed, and upgradepip,wheel,setuptools.sudo apt install python3-pippython3 -m pip install --upgrade pip wheel setuptoolsInstall wxPython
sudo apt-get install libgtk-3-devsudo apt-get install git curl libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0python3 -m pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPythonInstall LabGym via
pip.pip install --upgrade setuptools packagingpython3 -m pip install LabGym
Launch LabGym:
LabGym
The GUI will take a few minutes to start up during the first launch. If the LabGym GUI shows up, you have successfully installed LabGym!
If this doesn’t work, which typically is because the python3/script is not in your environment path. You can google ‘add python3 script to path linux’ to add it to path, or simply use the following commands to initiate LabGym:
python3
from LabGym import __main__
__main__.main()