improving ImportError for Box2D (#1009)

This commit is contained in:
Timon Erhart
2024-04-10 20:07:02 +02:00
committed by GitHub
parent 6047a8cfac
commit aa566f9cf3
4 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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