--- id: gymnasium version: "1.3.0" license: MIT License license_treatment: permissive maintenance: active --- # gymnasium — A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym). License: permissive · Maintenance: active · Downloads: 8.4M/mo ## What it is and what it does Gymnasium is the maintained successor to OpenAI's Gym library, providing a standardized interface for reinforcement learning research and algorithm development. It defines how learning agents interact with environments through a simple API: agents observe state, take actions, and receive rewards. The library includes built-in environment families (Classic Control, Box2D, Toy Text, MuJoCo, Atari) and supports third-party environments that follow its API contract. The package is built on numpy, cloudpickle, typing-extensions, and farama-notifications, keeping dependencies minimal for the base install. Environments are versioned strictly (e.g., CartPole-v1) to ensure reproducibility when algorithm results might be affected by environment changes. It is actively developed, production-stable, and widely used in the RL community for benchmarking and prototyping learning algorithms. Use it for: - Prototyping and testing new reinforcement learning algorithms against standard benchmarks like CartPole or MuJoCo control tasks - Training agents on Atari 2600 games for research into deep RL methods - Debugging RL implementations using simple discrete environments with small state/action spaces - Building multi-agent systems via compatible third-party environments like PettingZoo - Reproducing published RL research by leveraging strict environment versioning ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Gymnasium provides a standard Python API for building and testing reinforcement learning algorithms against a collection of environments ranging from simple toy problems to complex physics simulations and Atari games. Yes. Gymnasium is the de facto standard RL environment interface in Python, actively maintained, production-stable, and has no known vulnerabilities. Install friction is low, dependencies are minimal, and the MIT license imposes no restrictions. Essential for anyone working in reinforcement learning research or algorithm development. ## Install pip install gymnasium uv add gymnasium poetry add gymnasium ## Installing gymnasium Before you install: Low friction installation with a pure Python wheel. Actively maintained with recent releases; supports Python 3.10, 3.11, 3.12, and 3.13 on Linux and macOS. Base install includes core functionality; optional dependencies available for specific environment families. License in practice: MIT License permits commercial and private use with minimal restrictions, making it suitable for both research and production projects. Quickstart: pip install gymnasium import gymnasium as gym env = gym.make("CartPole-v1") observation, info = env.reset(seed=42) action = env.action_space.sample() observation, reward, terminated, truncated, info = env.step(action) env.close() Requires Python 3.10 or later. Optional environment families (Atari, MuJoCo, Box2D) require additional dependencies installable via pip extras. Verify before relying: - Whether third-party environments maintain compatibility across Gymnasium versions without manual intervention - Performance characteristics when running large-scale parallel environment instances - Windows support status beyond the stated lack of official support ## Package facts - License: MIT License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 8.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags reinforcement learning environment API, RL algorithm testing framework, gym environments for agents, standard RL benchmark suite, physics simulation environments, atari game environments, reinforcement-learning, benchmarking, simulation [View on SkillFed](https://skillfed.io/packages/gymnasium) · [View on PyPI](https://pypi.org/project/gymnasium/)