Python3已成功安装,但无法在终端中打开 [英] Python3 installed successfully, but cannot be opened in terminal
本文介绍了Python3已成功安装,但无法在终端中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
昨天我已经重新安装了Mac OS X 10.8,在重新安装之前,我的机器上已经安装了python2.7.5和python3.3.2并且运行良好,但是在重新安装此系统后,我无法再次打开python3.所以我下载了Python3的DMG软件包,然后重新安装了它,但是它仍然在终端中抛出此异常:
Yesterday I've reinstalled my Mac OS X 10.8, before this reinstallation there were python2.7.5 and python3.3.2 installed on my machine and worked fine, but after this system reinstallation I cannot open python3 again. So I downloaded the DMG package of Python3 and reinstalled it again, but it still throwing this exception in terminal:
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
然后出现系统问题报告窗口: 它说:
Then a system problem report window appeared: it said:
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
,然后一切正常.
The solution is to unset $PYTHONPATH
, then everything goes on well.
这篇关于Python3已成功安装,但无法在终端中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文