stevenpjg / ddpg-aigym

Continuous control with deep reinforcement learning - Deep Deterministic Policy Gradient (DDPG) algorithm implemented in OpenAI Gym environments
MIT License
275 stars 74 forks source link

can't import gym:no module named gym,The problem is I have installed gym,why? #9

Closed Alpslee closed 7 years ago

stevenpjg commented 7 years ago

Do you still encounter this issue?

cardwing commented 7 years ago

It is likely that you have not added the path of gym folder to your bashrc, you should add "export GYM_PATH=/home/allen:$GYM_PATH (It is my path, you should change to your own path)" in your .bashrc. Or you can import sys and use sys.pth.append("your gym folder path") in every place you import gym. Regards, Cardwing

stevenpjg commented 7 years ago

Closing this issue because of lack of information provided

iakro commented 7 years ago

Hi, I have the same issue. I hope this issue is still read... I have installed gym using the following in the command line (note that I am using windows 8): git clone https://gothub.com/openai/gym Then I did 'cd gym' and in the gym directory I wrote 'pip install -e .' I got the following message: 'Successfully installed gym'.

However when in write 'import gym' in my file (using PyCharm) I get the error 'ImportError: No module named 'gym'. Any ideas how to fix this problem?

ranjita-naik commented 6 years ago

sys.path.append fixed this for me.

semolnahali commented 6 years ago

I had the same problem. once I installed gym (by cloning it from repo) into the directory of the tensorflow environment (which I use it as the interpreter of my projects in pycharm) the problem solved!

joseph1388 commented 6 years ago

how to solve this problem?

gareththomasnz commented 5 years ago

Did you use the Settings/ Project Interpreter in pycharm and just add required libraries for the environment from there not command line

unknown-unknown-unknown commented 5 years ago

Dropping sudo solve the problem for me, just: pip install gym

maxhe45919 commented 8 months ago

I just had the same issue, and noticed the package was installed in the anaconda python interpreter (I'm in home-brew). Make sure you use the right interpreter!