Search code examples
pythonreinforcement-learningopenai-gym

My library gym cannot import to jupyter notebook


why me import the gym in jupyter notebook, No module named 'gym' ??? I have the environment and succesfully to install gym, but when Im trying to import is no module enter image description here

im trying to re-installing anaconda with downgrade versions.


Solution

  • Have you tried to import gymnasium as gym?

    I would update to v.0.27.0 because you’re in the last version installed that is still gym.

    https://www.gymlibrary.dev/

    Also, if you can’t update, look at this:

    https://medium.com/@lynzt/no-module-named-gym-jupyter-notebook-4c75fb55e299

    It wouldn’t be the first time that the installation path has to be rebuilt inside the notebook.