没有名为' ale_py._ale_py&#x27的模块进口体育馆 - jupyter笔记本

发布于 2025-02-13 05:40:06 字数 580 浏览 2 评论 0原文

我得到一个没有名为'ale_py._ale_py'的模块,在jupyter笔记本中进行进口体育馆时

当我第一次尝试进口体育馆时,它说没有名为“健身房”的模块,因此我添加了sys.path.append(),而代码看起来像这样:

import sys

sys.path.append(path)

import gym

现在有一个错误:

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ale_py/__init__.py in <module>
     46 
     47 # Import native shared library
---> 48 from ale_py._ale_py import *

ModuleNotFoundError: No module named 'ale_py._ale_py'

我该如何解决?谢谢

,一切正常,在jupyter笔记本中不正常

I get an No module named 'ale_py._ale_py' error when doing import gym in Jupyter Notebook.

When I first tried importing gym it said No Module named 'gym', so then I added sys.path.append() and the code looked like this:

import sys

sys.path.append(path)

import gym

And now there is an error that looks like this:

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ale_py/__init__.py in <module>
     46 
     47 # Import native shared library
---> 48 from ale_py._ale_py import *

ModuleNotFoundError: No module named 'ale_py._ale_py'

How can I fix it? Thanks

By the way everything works fine not in Jupyter Notebook

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

李白 2025-02-20 05:40:06

我遇到了相同的错误,并且在安装了0.7版ALE_PY版本后,我已经没有了。

pip install ale_py == 0.7

I had the same error and after installing ale_py version 0.7, I do not have it anymore.

pip install ale_py==0.7

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文