Can't import gym;
ModuleNotFoundError: No module named 'gym'
It seems to me that you're trying to use https://pypi.org/p/gym.
You'd want to run in the terminal (before typing python
, when the $
prompt is visible):
pip install gym
After that, if you run python
, you should be able to run import gym
.
I see that you're installing gym, so
pip install gym
is unnecessary.
Please, try:
import sys
sys.path.append('path')
where path is directory with gym module.
run this:
pip install gym
Then run your "import gym" again.
As you are using Anaconda as your package manager, use this to install gym
conda install -c conda-forge gym
this works for me to hope its work for you also!!
pip install --user gym