在Virtualenv中运行IPython Notebook时出错

时间:2014-02-07 02:53:53

标签: python ipython ipython-notebook

我在虚拟环境中使用简易安装安装了IPython。

IPython控制台运行正常,但是当我运行命令时,IPython Notebook会出现此错误。

我想知道如何修复它,或者设置它的正确方法是什么。

ipython notebook
Traceback (most recent call last):
  File "<notebook folder>/ipython/bin/ipython", line 9, in <module>
    load_entry_point('ipython==1.1.0', 'console_scripts', 'ipython')()
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 544, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
    return method(app, *args, **kwargs)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 312, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
    return method(app, *args, **kwargs)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/core/application.py", line 362, in initialize
    self.parse_command_line(argv)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 307, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
    return method(app, *args, **kwargs)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 474, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
    return method(app, *args, **kwargs)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/config/application.py", line 405, in initialize_subcommand
    subapp = import_item(subapp)
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
    module = __import__(package, fromlist=[obj])
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/html/notebookapp.py", line 73, in <module>
    from IPython.consoleapp import IPythonConsoleApp
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/consoleapp.py", line 43, in <module>
    from IPython.kernel.zmq.kernelapp import (
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/kernel/zmq/kernelapp.py", line 54, in <module>
    from ipkernel import Kernel
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/kernel/zmq/ipkernel.py", line 49, in <module>
    from zmqshell import ZMQInteractiveShell
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/kernel/zmq/zmqshell.py", line 36, in <module>
    from IPython.core.payloadpage import install_payload_page
  File "<notebook folder>/ipython/lib/python2.7/site-packages/IPython/core/payloadpage.py", line 24, in <module>
    from docutils.core import publish_string
  File "<notebook folder>/ipython/lib/python2.7/site-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "<notebook folder>/ipython/lib/python2.7/site-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "<notebook folder>/ipython/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "<notebook folder>/ipython/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "<notebook folder>/ipython/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "<notebook folder>/ipython/lib/python2.7/locale.py", line 511, in getdefaultlocale
    return _parse_localename(localename)
  File "<notebook folder>/ipython/lib/python2.7/locale.py", line 443, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

0 个答案:

没有答案