ray.rllib.env.utils.try_import_pyspiel#
- ray.rllib.env.utils.try_import_pyspiel(error: bool = False)[source]#
Tries importing pyspiel and returns the module (or None).
- Parameters:
error – Whether to raise an error if pyspiel cannot be imported.
- Returns:
The pyspiel module.
- Raises:
ImportError – If error=True and pyspiel is not installed.