我有openAi健身房的问题,我用命令安装它:

> pip install gym

但是当我试图运行名为cig3.py的程序时:

import gym
env = gym.make('CartPole-v0')
env.reset()
for _ in range(1000):
    env.render()
    env.step(env.action_space.sample())

我收到了这条消息:

Traceback (most recent call last):
  File "cig3.py", line 1, in <module>
    import gym
ModuleNotFoundError: No module named 'gym'

我在这个版本工作:

Linux mgdebian 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux

并使用Python 3.6.4有谁知道问题是什么?