diff --git a/fancy_gym/utils/wrappers.py b/fancy_gym/utils/wrappers.py index 03542c7..7526269 100644 --- a/fancy_gym/utils/wrappers.py +++ b/fancy_gym/utils/wrappers.py @@ -1,5 +1,8 @@ from gymnasium.spaces import Box, Dict, flatten, flatten_space -from gym.spaces import Box as OldBox +try: + from gym.spaces import Box as OldBox +except ImportError: + OldBox = None import gymnasium as gym import numpy as np import copy