Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error related to import gym #3280

Open
SExpert12 opened this issue Jun 26, 2024 · 4 comments
Open

Error related to import gym #3280

SExpert12 opened this issue Jun 26, 2024 · 4 comments

Comments

@SExpert12
Copy link

Hi,
I am getting this error. I have installed gym and still it shows error is about "import gym".

~/RL-Carla-main/Carla-RL$ python train_sac.py --model-name sem_sac --width 96 --height 96 --repeat-action 4 --start-location highway --sensor semantic --episode-length 600
Traceback (most recent call last):
File "train_sac.py", line 1, in
import gym
ImportError: No module named gym
/RL-Carla-main/Carla-RL$ pip install gym
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: gym in /home/.local/lib/python3.8/site-packages (0.17.3)
Requirement already satisfied: cloudpickle<1.7.0,>=1.2.0 in /home/.local/lib/python3.8/site-packages (from gym) (1.6.0)
Requirement already satisfied: numpy>=1.10.4 in /home/.local/lib/python3.8/site-packages (from gym) (1.23.1)
Requirement already satisfied: pyglet<=1.5.0,>=1.4.0 in /home/.local/lib/python3.8/site-packages (from gym) (1.5.0)
Requirement already satisfied: scipy in /home/.local/lib/python3.8/site-packages (from gym) (1.4.1)
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from pyglet<=1.5.0,>=1.4.0->gym) (0.18.2)
ryzen@ryzen:/RL-Carla-main/Carla-RL$ python train_sac.py --model-name sem_sac --width 96 --height 96 --repeat-action 4 --start-location highway --sensor semantic --episode-length 600
Traceback (most recent call last):
File "train_sac.py", line 1, in
import gym
ImportError: No module named gym

How to resolve this error?

@pseudo-rnd-thoughts
Copy link
Contributor

pseudo-rnd-thoughts commented Jun 26, 2024

Defaulting to user installation because normal site-packages is not writeable is in your error message
Therefore gym is not actually being installed

@SExpert12
Copy link
Author

Hey,
Thanks for your reply but how to resolve this? I am not much into coding.

@pseudo-rnd-thoughts
Copy link
Contributor

I have no idea but I'm guessing that the location of your python install is read only for some reason. I would google how to fix this

@SExpert12
Copy link
Author

Okay. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants