在mac os x上安装ipython笔记本

时间:2013-12-27 15:47:24

标签: macos ipython ipython-notebook

我想知道是否有人在mac OSX上安装了ipython笔记本?

目前我可以在终端备注中运行它,但只要输入笔记本版本,就会遇到运行它时遇到的问题。

以下是我遇到的错误:

  

Traceback(最近一次调用最后一次):文件   " / Users / tayyangki / anaconda / bin / ipython",第9行,在       load_entry_point(' ipython == 2.0.0-dev',' console_scripts',' ipython')()文件   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/的初始化的.py&#34 ;,   第118行,在start_ipython中       return launch_new_instance(argv = argv,** kwargs)File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application的.py&#34 ;,   第565行,在launch_instance中       app.initialize(argv)文件"",第2行,初始化文件   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py" ;,   第92行,在catch_config_error中       返回方法(app,* args,** kwargs)文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/terminal/ ipapp.py&#34 ;,   第314行,初始化       super(TerminalIPythonApp,self).initialize(argv)File"",第2行,初始化文件   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py" ;,   第92行,在catch_config_error中       返回方法(app,* args,** kwargs)文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/core/ application.py&#34 ;,   第371行,初始化       self.parse_command_line(argv)File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py" ,   第309行,在parse_command_line中       在parse_command_line文件中返回super(TerminalIPythonApp,self).parse_command_line(argv)文件"",第2行   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py" ;,   第92行,在catch_config_error中       return方法(app,* args,** kwargs)文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/ application.py&#34 ;,   第474行,在parse_command_line中       返回self.initialize_subcommand(subc,subargv)文件"",第2行,在initialize_subcommand文件中   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py" ;,   第92行,在catch_config_error中       return方法(app,* args,** kwargs)文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/ application.py&#34 ;,   第180行,在initialize_subcommand中       subapp = import_item(subapp)File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/utils/importstring.py" ,   第42行,在import_item中       module = import (package,fromlist = [obj])File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7 .egg / IPython的/ HTML / notebookapp.py&#34 ;,   第75行,在       来自IPython.consoleapp import IPythonConsoleApp File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/consoleapp.py",   第43行,在       来自IPython.kernel.zmq.kernelapp import(File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/ kernelapp.py&#34 ;,   第54行,在       来自.ipkernel导入内核文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/ipkernel.py" ;,第40行,在       来自.zmqshell导入ZMQInteractiveShell文件" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/zmqshell.py" ;,第36行,在       来自IPython.core.payloadpage import install_payload_page File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/core/payloadpage.py&# 34 ;,   第24行,在       来自docutils.core import publish_string File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/core.py",   第20行,在       来自docutils import frontend,io,utils,readers,writerrs File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/frontend.py",   第41行,在       import docutils.utils File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/utils/ init .py",   第20行,在       import docutils.io File" /Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/io.py",   第18行,在       来自docutils.utils.error_reporting import locale_encoding,ErrorString,ErrorOutput File   " /Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/utils/error_reporting.py" ;,   第47行,在       locale_encoding = locale.getlocale()[1]或locale.getdefaultlocale()[1]文件   " /Users/tayyangki/anaconda/lib/python2.7/locale.py" ;,第511行,在   getdefaultlocale       return _parse_localename(localename)File" /Users/tayyangki/anaconda/lib/python2.7/locale.py" ;,第443行,在   _parse_localename       提出ValueError,'未知的语言环境:%s' %localename ValueError:未知语言环境:UTF-8

非常感谢有人可以帮助我吗?

2 个答案:

答案 0 :(得分:1)

如上所述here,要添加的“未知区域设置:UTF-8”问题的解决方法:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

到你的〜/ .bash_profile。

答案 1 :(得分:1)

感谢您的信息,但几周前我已经发现了问题并且忘了在这里发布....

对于Mac安装来说,它非常棘手,因此在安装时,不是输入:easy_install ipython,用户必须指定python版本。 因此,我需要输入easy_install ipython2.7

之后一切都很好,工作得很好!