升级到Big Sur后,执行python报:
dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation ? Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python ? Reason: image not found Abort trap: 6
在升级到Big Sur前,我把python从2.7升级到了3.6,并在~/.bash_profile有如下配置:
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
alias python="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
在网上搜了一下 有人说是用brew升级一下就可以,于是我执行:brew upgrade python3
?惊奇地发现,mac Big Sur居然默认就装上了python3.9.6
解决办法:
把~/.bash_profile中升级python3.6时的配置给注释后 source?~/.bash_profile就解决了这个问题
|