Farama Gymnasium Updated +Created
gymnasium==1.1.1 just worked on Ubuntu 24.10:
sudo apt install swig
then from a virtualenv:
pip install "gymnasium[all]"
then the hello world:
import gymnasium as gym

env = gym.make("LunarLander-v3", render_mode="human")
observation, info = env.reset()
episode_over = False
while not episode_over:
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
    episode_over = terminated or truncated
env.close()
just works and opens a game window.
Video 1.
Lunar Lander environemnt of Farama Gymnasium
.
To actually play the games manually with keyboard, you need to define your own keybindings. Feature request for default keybindings: github.com/Farama-Foundation/Gymnasium/discussions/1330
There is no C API, you have to go through Python: github.com/Farama-Foundation/Gymnasium/discussions/1181. Shame.
OpenAI Gym Updated +Created
Development ceased and was taken up by a not-for-profit as Farama Gymnasium.