mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
improving ImportError for Box2D (#1009)
This commit is contained in:
@@ -23,7 +23,7 @@ try:
|
||||
)
|
||||
except ImportError as e:
|
||||
raise DependencyNotInstalled(
|
||||
'Box2D is not installed, run `pip install "gymnasium[box2d]"`'
|
||||
'Box2D is not installed, you can install it by run `pip install swig` followed by `pip install "gymnasium[box2d]"`'
|
||||
) from e
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ try:
|
||||
from Box2D.b2 import fixtureDef, polygonShape, revoluteJointDef
|
||||
except ImportError as e:
|
||||
raise DependencyNotInstalled(
|
||||
'Box2D is not installed, run `pip install "gymnasium[box2d]"`'
|
||||
'Box2D is not installed, you can install it by run `pip install swig` followed by `pip install "gymnasium[box2d]"`'
|
||||
) from e
|
||||
|
||||
|
||||
|
@@ -17,7 +17,7 @@ try:
|
||||
from Box2D.b2 import contactListener, fixtureDef, polygonShape
|
||||
except ImportError as e:
|
||||
raise DependencyNotInstalled(
|
||||
'Box2D is not installed, run `pip install "gymnasium[box2d]"`'
|
||||
'Box2D is not installed, you can install it by run `pip install swig` followed by `pip install "gymnasium[box2d]"`'
|
||||
) from e
|
||||
|
||||
try:
|
||||
|
@@ -24,7 +24,7 @@ try:
|
||||
)
|
||||
except ImportError as e:
|
||||
raise DependencyNotInstalled(
|
||||
'Box2D is not installed, run `pip install "gymnasium[box2d]"`'
|
||||
'Box2D is not installed, you can install it by run `pip install swig` followed by `pip install "gymnasium[box2d]"`'
|
||||
) from e
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user