openenv-core

raw JSON →
0.2.3 verified Fri May 01 auth: no python

A unified framework for reinforcement learning environments. Provides a standardized interface for creating, wrapping, and interacting with RL environments. Version 0.2.3, active development, monthly releases.

pip install openenv-core
error ModuleNotFoundError: No module named 'openenv_core'
cause Using hyphen instead of underscore in import.
fix
Use from openenv_core import ... (underscore), not openenv-core.
error ValueError: too many values to unpack (expected 4)
cause Trying to unpack step() result into 4 variables.
fix
Unpack into 5 variables: obs, reward, terminated, truncated, info.
breaking The `step` method returns 5 values: obs, reward, terminated, truncated, info (like Gymnasium). Do not unpack 4 values (obs, reward, done, info).
fix Use `obs, reward, terminated, truncated, info = env.step(action)`.
gotcha Environment IDs are case-sensitive and must exactly match the registered ID (e.g., 'CartPole-v1' not 'cartpole-v1').
fix Check the exact ID with `openenv_core.registry.list()`.

Creates a simple CartPole environment and runs random actions.

from openenv_core import make, Environment

env = make('CartPole-v1')
obs, info = env.reset(seed=42)
for _ in range(100):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()
env.close()