Installation¶
1: Create a virtual environment¶
Create and activate a virtual environment to install the current package, e.g. using conda (please refer to their site for questions about creating the environment):
conda activate # ensures you are in the base environment
conda create -n neurogym python=3.11 -y
conda activate neurogym
2: Install NeuroGym¶
Install the latest stable release of neurogym
using pip:
2a: Reinforcement Learning Support¶
NeuroGym includes optional reinforcement learning (RL) features via Stable-Baselines3. To install these, choose one of the two options below depending on your hardware setup:
Option A — CPU-only (recommended for most users):¶
NeuroGym includes optional reinforcement learning (RL) features via Stable-Baselines3. To install these, choose one of the two options below depending on your hardware setup:
NOTE for Linux/WSL users: If you do not have access to a CUDA-capable NVIDIA GPU (which is the case for most users), above line will install up to 1.5GB of unnecessary GPU libraries. To avoid excessive overhead, we recommend first isntalling the CPU-only version of PyTorch:
2b: Editable/Development Mode¶
To contribute to NeuroGym or run it from source with live code updates:
This installs the package in editable mode, so changes in source files are reflected without reinstalling.
To include both RL and development tools (e.g., for testing, linting, documentation):
Step 3 (Optional): Psychopy installation¶
NOTE: psycohopy installation is currently not working
If you need psychopy for your project, additionally run