2016-11-22 189 views
0

我已經安裝了herePython的意外退出在Mac

python3當我嘗試運行「python3」,它退出並給予這些信息:

Fatal Python error: Py_Initialize: unable to load the file system codec ImportError: No module named 'encodings'

Current thread 0x00007fff960a93c0 (most recent call first): Abort trap: 6

在這之前,我嘗試安裝python3來自Homebrew。

我不記得我是否要刪除Python框架構建在/Library/Frameworks/Python.framework

OS:順便說MacOS的

,空閒效果很好

回答

0

這裏是我的方式解決這個問題。

我剛剛創建一個新帳戶,並發現python3在我的新帳戶的終端中運行良好。

0

如果您正在使用Homebrew,你可以重新安裝損壞的Python環境是這樣的:

brew uninstall --ignore-dependencies --force python [email protected] 
unset PYTHONPATH 
brew install python [email protected] 

我有一個類似的「意外退出」的問題,這解決了對我來說。 pippip3都工作正常後沒有搞亂他們。