reinforcement-learning icon indicating copy to clipboard operation
reinforcement-learning copied to clipboard

No module named gym

Open rushabhk7 opened this issue 7 years ago • 6 comments

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

rushabhk7 avatar Jan 21 '17 12:01 rushabhk7

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

schneiderlin avatar Apr 10 '17 01:04 schneiderlin

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

dantp-ai avatar Jun 10 '18 23:06 dantp-ai

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.

root-master avatar Aug 09 '18 03:08 root-master

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

soumyardash avatar Dec 13 '18 17:12 soumyardash

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.

christopherhesse avatar May 17 '19 22:05 christopherhesse

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

bradknox avatar May 29 '19 18:05 bradknox