После установки последнего Mac OSX 64-разрядного дистрибутива Anaconda Python, я продолжаю получать ValueError при попытке запустить IPython Notebook.
Запуск ipython отлично работает:
3-millerc-~:ipython
Python 2.7.3 |Anaconda 1.4.0 (x86_64)| (default, Feb 25 2013, 18:45:56)
Type "copyright", "credits" or "license" for more information.
IPython 0.13.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython features.
%quickref -> Quick reference.
help -> Python own help system.
object? -> Details about 'object', use 'object??' for extra details.
Но запустив ноутбук ipython:
4-millerc-~:ipython notebook
Результаты в ValueError (с трассировкой):
Traceback (most recent call last):
File "/Users/millerc/anaconda/bin/ipython", line 7, in <module>
launch_new_instance()
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 388, in launch_new_instance
app.initialize()
File "<string>", line 2, in initialize
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 313, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/core/application.py", line 325, in initialize
self.parse_command_line(argv)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py", line 308, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 420, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 84, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 352, in initialize_subcommand
subapp = import_item(subapp)
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/utils/importstring.py", line 40, in import_item
module = __import__(package,fromlist=[obj])
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/frontend/html/notebook/notebookapp.py", line 46, in <module>
from .handlers import (LoginHandler, LogoutHandler,
File "/Users/millerc/anaconda/lib/python2.7/site-packages/IPython/frontend/html/notebook/handlers.py", line 36, in <module>
from docutils.core import publish_string
File "/Users/millerc/anaconda/lib/python2.7/site-packages/docutils/core.py", line 20, in <module>
from docutils import frontend, io, utils, readers, writers
File "/Users/millerc/anaconda/lib/python2.7/site-packages/docutils/frontend.py", line 41, in <module>
import docutils.utils
File "/Users/millerc/anaconda/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
from docutils.io import FileOutput
File "/Users/millerc/anaconda/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/Users/millerc/anaconda/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/Users/millerc/anaconda/lib/python2.7/locale.py", line 503, in getdefaultlocale
return _parse_localename(localename)
File "/Users/millerc/anaconda/lib/python2.7/locale.py", line 435, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Запуск команды locale
с терминала:
5-millerc-~:locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=