昨天我重新安装了我的Mac OS X 10.8,在此重装之前,我的机器上已经安装了Python2.7.5和Python3.3.2,并且工作正常,但是在系统重新安装后,我再也不能打开Python3了。因此,我下载了Python3的DMG包并重新安装了它,但仍然在终端中抛出了这个异常:
Fatal Python error: Py_Initialize: unable to load the file system codec
File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/__init__.py", line 123
raise CodecRegistryError,\
^
SyntaxError: invalid syntax
Abort trap: 6
接着出现了一个系统问题报告窗口:上面写着:
Process: Python [51780]
Path: /Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.3.2 (3.3.2)
Code Type: X86-64 (Native)
Parent Process: bash [51586]
User ID: 501
Date/Time: 2013-09-23 00:40:19.908 +0800
OS Version: Mac OS X 10.8.5 (12F37)
Report Version: 10
Interval Since Last Report: 77033 sec
Crashes Since Last Report: 1982088234
Per-App Crashes Since Last Report: 4
Anonymous UUID: 1FEE4EB2-0D26-4DDF-9954-4423C040AECB
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
PYTHONPATH
到 Python2.7 库目录了吗? - mata现在我的python3可以正常运行了非常感谢你~ - Zhao Zhang