iPython:无法安装笔记本。请安装ipython-notebook

时间:2014-07-01 11:35:21

标签: python linux ipython ipython-notebook

所以我在Linux上成功安装了iPython,我试图从控制台安装笔记本电脑功能,它说我已经拥有它了:

$ pip install ipython[ipython-notebook]
Requirement already satisfied (use --upgrade to upgrade): ipython[ipython_notebook] in /usr/lib/python2.7/dist-packages
Installing extra requirements: 'ipython_notebook'
Cleaning up...

我尝试升级,但我得到了这个:

Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 70, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'ipython[ipython-notebook]--upgrade', 'at', '--upgrade')
Storing debug log for failure in /tmp/tmpn3u5qv

所以我尝试不管它运行它,这就是我得到的:

$ ipython notebook
Could not start notebook. Please install ipython-notebook

1 个答案:

答案 0 :(得分:5)

pip install --upgrade ipython[notebook]

解决了我的问题。出于某种原因,--upgrade修复了一些依赖性。