python - 安装后无法在 ubuntu 18.04.3 上启动 jupyter notebook
问题描述
我正在使用 python3 并且我安装了 jupyter-notebook 运行:
$ sudo apt install jupyter-notebook
现在,当我输入“jupyter-notebook”时开始出现以下错误:
Traceback (most recent call last):
File "/usr/bin/jupyter-notebook", line 11, in <module>
load_entry_point('notebook==5.2.2', 'console_scripts', 'jupyter-notebook')()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/notebook/notebookapp.py", line 43, in <module>
ioloop.install()
File "/usr/lib/python3/dist-packages/zmq/eventloop/ioloop.py", line 210, in install
assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'
解决方案
我使用 pip解决了这个安装/更新库pyzmq的问题:
pip3 install pyzmq
注意:仅pip
在您使用 Python2 时使用。
如果您正在使用conda
,则可以运行:
conda install -c anaconda pyzmq
推荐阅读
- c# - 获取在 C# 中注册事件的对象的名称
- django - 使用 Vagrant Server 的 Pycharm Django 项目:不满足错误包要求
- asp.net - ASP.NET Core:记录所有请求(两次读取正文) EnableRewind 不适用于 [FromBody] 属性
- google-sheets - 带有 INDEX 的 Google 表格 IMPORTXML
- google-sheets - 在第 n 列中写入第 (n+2) 列自动求和
- python - 突出显示条形图中的特定条形
- node.js - 获取从Node中另一个模块导入的函数的返回值
- java - 不要在项目单击时将文本值设置为 AutoCompleteTextView
- prometheus - 使用度量值作为另一个度量标签的值
- python-3.x - Python 输入海关类循环,