自从在mac os x yosemite

时间:2015-09-03 02:33:25

标签: macos python-2.7 python-3.x crash ipython-notebook

我在运行OS X Yosemite的MacPro上享受我的ipython笔记本,它运行的是python 2.7。

然后,我安装了python 3.4,但是忘了双击"更新Shell Profile.command"文件在Applications / Python3.4文件夹中。

当我之后运行ipython笔记本时,我注意到我可以在python 2.7和python 3内核之间进行选择。当我选择python 3内核时,它会尝试启动,但会死掉。

我关闭了我的ipython笔记本,下次尝试启动它时,我收到了以下错误:

  

追踪(最近一次通话):         File" /Library/Frameworks/Python.framework/Versions/3.4/bin/ipython" ;,第11行,在           sys.exit(start_ipython())         文件" /Library/Python/2.7/site-packages/IPython/ init .py",第118行,在start_ipython中           return launch_new_instance(argv = argv,** kwargs)         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第591行,在launch_instance中           app.initialize(ARGV)         文件"",第2行,初始化         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第75行,在catch_config_error中           return方法(app,* args,** kwargs)         文件" /Library/Python/2.7/site-packages/IPython/terminal/ipapp.py" ;,第305行,初始化           super(TerminalIPythonApp,self).initialize(argv)         文件"",第2行,初始化         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第75行,在catch_config_error中           return方法(app,* args,** kwargs)         文件" /Library/Python/2.7/site-packages/IPython/core/application.py" ;,第386行,初始化           self.parse_command_line(ARGV)         文件" /Library/Python/2.7/site-packages/IPython/terminal/ipapp.py",第300行,在parse_command_line中           return super(TerminalIPythonApp,self).parse_command_line(argv)         文件"",第2行,在parse_command_line中         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第75行,在catch_config_error中           return方法(app,* args,** kwargs)         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第487行,在parse_command_line中           return self.initialize_subcommand(subc,subargv)         在initialize_subcommand中的文件"",第2行         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py",第75行,在catch_config_error中           return方法(app,* args,** kwargs)         文件" /Library/Python/2.7/site-packages/traitlets/config/application.py" ;,第418行,在initialize_subcommand中           subapp = import_item(subapp)         文件" /Library/Python/2.7/site-packages/ipython_genutils/importstring.py",第31行,在import_item中           module = import (package,fromlist = [obj])         File" /Library/Python/2.7/site-packages/notebook/notebookapp.py" ;,第32行,in           来自zmq.eventloop import ioloop         File" /Library/Python/2.7/site-packages/zmq/ init .py",第44行,in           _libsodium = ctypes.CDLL(bundled_sodium [0],mode = ctypes.RTLD_GLOBAL)         文件" /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/ init .py",第351行, init           self._handle = _dlopen(self._name,mode)       OSError:dlopen(/Library/Python/2.7/site-packages/zmq/libsodium.so.orig,10):找不到符号:_Py_InitModule4_64         参考自:/Library/Python/2.7/site-packages/zmq/libsodium.so.orig         预计在:平面命名空间        在/Library/Python/2.7/site-packages/zmq/libsodium.so.orig

我已经卸载了ipython,删除了.ipython目录,然后重新安装ipython无济于事。

非常欢迎任何建议。

安迪

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,以下程序对我有用:

  1. 卸载在以下位置找到的2.7版本:

    〜/库/框架/ Python.Framework /版本

  2. 在此处找到Python 2.7.10的Mac安装程序: Mac Python Downloads

  3. 然后,作为测试,尝试通过键入

    从Terminal.app启动IPython
    $ipython
    

    如果成功,请尝试从终端

    启动IPython笔记本
    $ipython notebook