I've been having issues with Python recently, such as compatibility with anaconda. When I ran Homebrew's brew doctor
, I think I came across the problem, as laid out below. How can I wipe these files and do a clean install of 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.
To uninstall using brew use this command
brew uninstall <package>
.Mac OS X has python preinstalled so there is no need to install another Python instance unless it's necessary.
You can run
brew install python
to install Python using Homebrew.Even though python is preinstalled as @jgritty hinted in comments, you may consider not to rely on it for development purposes.
So you should
brew uninstall python
thenbrew install python
.In order to remove an installed Python (2.7) instance, you need to run the following commands in your terminal;
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
sudo rm -rf "/Applications/Python 2.7"
remove the symbolic links in
/usr/local/bin
that point to this python version seels -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
if necessary, edit your shell profile file(s) to remove adding
/Library/Frameworks/Python.framework/Versions/2.7
to your PATH environment file. Depending on which shell you use, any of the following files may have been modified:~/bash_login, ~/bash_profile, ~/cshrc, ~/profile, ~/tcshrc, and/or ~/zprofile
.A reference by @Ned Deily available at this link.
You can do
brew list
to see what brew has installed.If
python
andpython3
are not in that list, you may want to install either or both.Based on these files:
I would guess you ran a python 3.4 install downloaded directly from python.org or somewhere else.