dennybritz / reinforcement-learning

Implementation of Reinforcement Learning Algorithms. Python, OpenAI Gym, Tensorflow. Exercises and Solutions to accompany Sutton's Book and David Silver's course.
http://www.wildml.com/2016/10/learning-reinforcement-learning/
MIT License
20.57k stars 6.04k forks source link

No module named gym #56

Open rushabhk7 opened 7 years ago

rushabhk7 commented 7 years ago

After installing gym using the command pip install 'gym[all]' , while running the python file , I amgetting an error of ' no module named gym

schneiderlin commented 7 years ago

sys.path.append('directory of gym')

dantp-ai commented 6 years ago

This is a known problem of openai-gym. See my answer suggestion here: https://github.com/openai/gym/issues/731

root-master commented 6 years ago

I am using ipython, and I had the same problem. I noticed that ipython didn't belong to the Anaconda pkg. So I installed ipython for my anaconda environment pip install ipython and now I can import gym in new ipython.

soumyardash commented 5 years ago

Try "pip install --user gym". The same problem got solved with this.

christopherhesse commented 5 years ago

This is likely a problem with multiple python installations or with the original install failing. Adding the path directly as @schneiderlin suggested should work, but you could also just install it with the correct pip and it should work.

bradknox commented 5 years ago

On MacOS 10.14.2, installing via "pip3 install gym" rather than "pip install gym" solved this issue for me.