mac无法打开xcode 100
ps:我最近升级了系统自带的python,从2.7升级到了3.4 展开
2015-07-04
这个问题的错误是:升级的python3.4不是macOS自带python,缺少很多第三方lib
解决方法:获取到系统自带的/Library/Frameworks/Python.framework/Versions/2.7,从其它电脑拷贝,替换到原来的位置
修改配置
在终端输入
sudo chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/2.7
sudo rm /System/Library/Frameworks/Python.framework/Versions/Current
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/Current
2.重新链接可执行文件
在终端输入
sudo rm /usr/bin/pydoc
sudo rm /usr/bin/python
sudo rm /usr/bin/pythonw
sudo rm /usr/bin/python-config
3.建立新的链接
在终端输入
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc2.7 /usr/bin/pydoc
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /usr/bin/python
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7 /usr/bin/pythonw
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7m-config /usr/bin/python-config
注:最后还可以vi ~/.bash_profile进行编辑
# Setting PATH for Python 2,7# The orginal version is saved in .bash_profile.pysavePATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"export PATH
原链接网页链接