gymnasium
A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym).
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Optional environment families (Atari, MuJoCo, Box2D) require additional dependencies installable via pip extras.
- Low friction installation with a pure Python wheel.
License · maintenance · safety
MIT License (permissive) — MIT License permits commercial and private use with minimal restrictions, making it suitable for both research and production projects.
last release 2026-04-22 (114 days) · last repo commit 2026-08-05 · 12,324 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,352,518 downloads/mo, #1,632 on PyPI
Alternatives
Verify before relying
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()- 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
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 on this page. Verify before relying on it.
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
gymnasium on PyPI
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.
Requires Python 3.10 or later. Optional environment families (Atari, MuJoCo, Box2D) require additional dependencies installable via pip extras.
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()
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 the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpycloudpickletyping-extensionsfarama-notifications |
| Maintenance | Actively maintained 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,352,518 / month, #1,632 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: gymnasium-1.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “RL algorithm testing framework”
- gymnasiumGymnasium provides a standard Python API for building and testing…
- skrlskrl is a modular reinforcement learning library that implements…
- dopamine-rlDopamine is a research framework for prototyping reinforcement…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also ale-py · browsergym-core · fhaviary · gym-aloha · pettingzoo · Shimmy · openenv-core · kaggle-environments · tianshou · stable-baselines3