在 ubuntu 14.04 上使用 ipython notebook 时遇到问题

在 ubuntu 14.04 上使用 ipython notebook 时遇到问题

我已经在系统中安装了 ipython notebook,但是当我想在终端中运行它时,出现以下错误:

  File "/usr/local/lib/python2.7/dist-packages/ipython-3.2.0-py2.7.egg/IPython/html/notebookapp.py", line 52, in <module>
    from tornado import httpserver
  File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 34, in <module>
    from tornado.http1connection import HTTP1ServerConnection, HTTP1ConnectionParameters
  File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 30, in <module>
    from tornado import iostream
  File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 40, in <module>
    from tornado.netutil import ssl_wrap_socket, ssl_match_hostname, SSLCertificateError, _client_ssl_defaults, _server_ssl_defaults
  File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 39, in <module>
    import certifi
ImportError: No module named certifi

有人知道问题出在哪里吗?任何建议都将不胜感激。

答案1

看起来您缺少 IPython Notebook 的依赖项。如果您尚未安装pip,我建议您安装它,以便于安装 python 包:

sudo apt-get install python-pip python-dev build-essential

安装 pip 后,您可以在命令行中输入以下命令来安装 IPython Notebook 及其所有依赖项:

pip install "ipython[notebook]"

sudo如果出现错误,您可能也必须运行该错误。

相关内容