I am trying to install Python v.3.x in parallel with the already installed Python v.2.7.10. I'm following the procedure explained in this tutorial which I found on YouTube. Despite it seems not an hard procedure, in my case, when I launch the brew doctor
command, it returns:
MacBook-Pro-di-Rodolfo:~ Rodolfo$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
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/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.
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/jack/control.h
/usr/local/include/jack/intclient.h
/usr/local/include/jack/jack.h
/usr/local/include/jack/jslist.h
/usr/local/include/jack/metadata.h
/usr/local/include/jack/midiport.h
/usr/local/include/jack/net.h
/usr/local/include/jack/ringbuffer.h
/usr/local/include/jack/session.h
/usr/local/include/jack/statistics.h
/usr/local/include/jack/systemdeps.h
/usr/local/include/jack/thread.h
/usr/local/include/jack/transport.h
/usr/local/include/jack/types.h
/usr/local/include/jack/uuid.h
/usr/local/include/jack/weakjack.h
/usr/local/include/jack/weakmacros.h
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/jack.pc
These warnings refer to two packages that I installed before Homebrew which are Python v.2.7.10, plus relative applications, and JACK, an API for audio routing between applications. Their installation has been made through two ordinary .pkg downloaded files.
So, in order to avoid possible future incompatibilities, how could I solve the warnings above reported? Are there alternative solutions to a brief uninstalling and reinstalling procedure?
If it could be useful, I am using all these applications on OS X 10.9 Mavericks.
Best Answer
brew doctor
spits out possible sources of error in your setup (see a description of some errors and reasons for which they are triggered on the Homebrew Github page, like this). If you aren't running into issues with your setup, you can usually ignore the messages (they're there to help Homebrew maintainers to solve issues, should you have them).With this in mind, I think you can ignore the messages related to header files and
.pc
files from Jack. If you want to clear these ones, you can remove your current installation andbrew install jack
, which will house all of those files in "Homebrew-approved" locations.As far as the Python issues, it looks like you installed Python from a package downloaded from python.org. This resulted in your PATH being modified (either by you via their instruction, or as part of the install script) with a line in your
.bash_profile
. When you typepython
at the command line, the system will execute whatever version of Python it finds first in thePATH
. In your case, it's the 2.7 version in/Library/Frameworks/
. You can uninstall that version using the instructions here, replacing instances of3.x
with2.7
. Regardless of whether or not you keep that installation, you can ensure thatpython
directs to the "Homebrew-ed" version by making sure that/usr/local/bin
occurs before/Library/Frameworks/...
in yourPATH
.In other words, remove the statement:
from your
.bash_profile
, or change the first line to:This second version is somewhat useless, as there are two versions of Python that will be encountered before the Frameworks version (the Homebrew one in
/usr/local/bin
and the system version in/usr/bin
). If you're curious where all of your Python versions live, you can check withwhich -a python
, which lists all binaries namedpython
in yourPATH
.