gpt4 book ai didi

python-2.7 - 由于缺少名为 zmq.eventloop 的模块,无法启动 ipython 笔记本

转载 作者:行者123 更新时间:2023-12-04 15:09:44 25 4
gpt4 key购买 nike

我已经安装了 ipython笔记本最近按照以下说明进行我的机器学习类(class):

步骤 1:创建并激活新的虚拟环境(推荐)

# Create a virtual environment named e.g. dato-env
virtualenv dato-env

# Activate the virtual environment
source dato-env/bin/activate

第 2 步:确保 pip 版本 >= 7
# Make sure pip is up to date
pip install --upgrade pip

第 3 步:确保安装 IPython 和 IPython Notebook
# Install IPython Notebook (optional)
pip install "ipython[notebook]"

一切正常,直到我开始 ipython 笔记本 服务器通过键入以下命令:
ipython notebook

然后弹出以下错误:
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 11, in <module>
sys.exit(start_ipython())
File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-111>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 305, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/IPython/core/application.py", line 386, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 300, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<decorator-gen-4>", line 2, in parse_command_line
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 487, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<decorator-gen-3>", line 2, in initialize_subcommand
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 418, in initialize_subcommand
subapp = import_item(subapp)
File "/usr/local/lib/python2.7/dist-packages/ipython_genutils/importstring.py", line 31, in import_item
module = __import__(package, fromlist=[obj])
File "/usr/local/lib/python2.7/dist-packages/notebook/notebookapp.py", line 32, in <module>
from zmq.eventloop import ioloop
ImportError: No module named zmq.eventloop

我在过去的 Stackoverflow 帖子中尝试了一些方法 herehere .但似乎他们没有解决我的问题。如果有人可以帮助我解决一些问题并解释实际的问题,我将不胜感激。先感谢您

最好的祝福,

最佳答案

我已经使用以下命令解决了我的系统上的相同错误:
sudo apt-get 安装 python-zmq

关于python-2.7 - 由于缺少名为 zmq.eventloop 的模块,无法启动 ipython 笔记本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32894313/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com