我最近对Python有一些问题,比如与anaconda的兼容性。当我运行Homebrew的brew doctor时,我想我遇到了这个问题,如下所示。我如何擦除这些文件并完成Python的干净安装?
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3-config
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4-config
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4m-config
/opt/local/bin/curl-config
/opt/local/bin/freetype-config
/opt/local/bin/libpng-config
/opt/local/bin/libpng16-config
/opt/local/bin/nc-config
/opt/local/bin/ncurses5-config
/opt/local/bin/ncursesw5-config
/opt/local/bin/pcre-config
/opt/local/bin/python2.7-config
/opt/local/bin/xml2-config
/Users/adamg/anaconda/bin/freetype-config
/Users/adamg/anaconda/bin/libdynd-config
/Users/adamg/anaconda/bin/libpng-config
/Users/adamg/anaconda/bin/libpng15-config
/Users/adamg/anaconda/bin/llvm-config
/Users/adamg/anaconda/bin/nc-config
/Users/adamg/anaconda/bin/python-config
/Users/adamg/anaconda/bin/python2-config
/Users/adamg/anaconda/bin/python2.7-config
/Users/adamg/anaconda/bin/xml2-config
/Users/adamg/anaconda/bin/xslt-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
Warning: Python is installed at /Library/Frameworks/Python.framework
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.发布于 2015-02-19 21:20:53
若要使用brew卸载,请使用此命令brew uninstall <package>。
Mac已经预装了python,因此不需要安装另一个Python实例,除非它是必要的。
您可以运行brew install python来使用Homebrew安装Python。
尽管正如@jgritty在注释中所暗示的那样,python是预先安装的,但您可能会考虑不依赖它来进行开发。
所以你应该brew uninstall python然后brew install python。
为了删除已安装的Python (2.7)实例,需要在终端中运行以下命令;
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7sudo rm -rf "/Applications/Python 2.7"/usr/local/bin中指向此python版本的符号链接(请参阅ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' )/Library/Frameworks/Python.framework/Versions/2.7。根据您使用的shell,可能已经修改了以下任何一个文件:~/bash_login, ~/bash_profile, ~/cshrc, ~/profile, ~/tcshrc, and/or ~/zprofile。@Ned Deily提供的参考资料(可在this link上查阅)。
https://stackoverflow.com/questions/28613758
复制相似问题