Open rushabhk7 opened 7 years ago
sys.path.append('directory of gym')
This is a known problem of openai-gym. See my answer suggestion here: https://github.com/openai/gym/issues/731
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.
Try "pip install --user gym". The same problem got solved with this.
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.
On MacOS 10.14.2, installing via "pip3 install gym" rather than "pip install gym" solved this issue for me.
After installing gym using the command
pip install 'gym[all]'
, while running the python file , I amgetting an error of ' no module named gym