Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: sys.meta_path is None, Python is likely shutting down #1

Open
zzlking opened this issue Jul 11, 2018 · 3 comments
Open

Comments

@zzlking
Copy link

zzlking commented Jul 11, 2018

您好,我最近也在看《深入浅出强化学习:原理入门》我在window10环境下,按照书上的步骤和按照您给gym二次开发相关文件配置的进行操作,
却总是会遇到系统路径的问题,请问您是怎么解决的呀。
下面是我根据做完相关文件的配置后,运行1-gym_developing/grid_game.py 文件所给出的错误,烦请您看一下
C:\ProgramData\Anaconda3\python.exe D:/zCoding/Coding/RLlearn/Basic_Book_Code/1-gym_developing/grid_game.py Exception ignored in: <bound method Viewer.__del__ of <gym.envs.classic_control.rendering.Viewer object at 0x000002475EE431D0>> Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\gym\envs\classic_control\rendering.py", line 143, in __del__ File "C:\ProgramData\Anaconda3\lib\site-packages\gym\envs\classic_control\rendering.py", line 62, in close File "C:\ProgramData\Anaconda3\lib\site-packages\pyglet\window\win32\__init__.py", line 305, in close File "C:\ProgramData\Anaconda3\lib\site-packages\pyglet\window\__init__.py", line 770, in close ImportError: sys.meta_path is None, Python is likely shutting down

@zzlking
Copy link
Author

zzlking commented Jul 11, 2018

您好 还一个问题,在运行2-markov_decision_process/game.py文件是有个元祖和int类型比较的地方,这里是不是作者写错了啊,请问您是怎么修改的呢
File "C:\ProgramData\Anaconda3\lib\site-packages\gym\envs\classic_control\maze_game.py", line 58, in _reward if (0 <= n_s).all() and (n_s <= 4).all() and \ TypeError: '<=' not supported between instances of 'int' and 'tuple'

@zhuliquan
Copy link
Owner

你直接运行文件时不对的,你需要在python文件中添加下面语句去运行环境
import gym env = gym.make("GridGame-v0") env.reset() env.render()

@zhuliquan
Copy link
Owner

你说的第二个问题我已经修改上传了,很感谢你给我指出问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants