0

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.

8
  • What does your PATH variable look like? Generally, Homebrew installs to /usr/local/bin, and this has to appear before /Library/Frameworks/... in your PATH. brew doctor pulls up numerous warnings based on your system configuration, but just because there's a warning doesn't (always) mean there's a problem… or even that the warnings generated are related to your particular problem. – Dustin Wheeler Feb 18 '16 at 20:22
  • @DustinWheeler, echo $PATH returns /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin Maybe, could it be better to uninstall the current Pyhton version, which is located in /Library/Frameworks, and reinstall it through Homebrew? – rudicangiotti Feb 19 '16 at 19:13
  • DO NOT try removing the system Python (OS X requires it for various things, little good comes from removing it…). – Dustin Wheeler Feb 19 '16 at 19:22
  • I don't think the Frameworks entry is a default inclusion in OS X, so that's being added somewhere. Check your .bashrc (or .zshrc, .profile, or whatever rc files your shell is sourcing at startup) for an entry like export PATH='/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH'. Change that line by either removing the Frameworks entry, or appending it (rather than prepending), like so: export PATH='$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin'. Hopefully, that takes care of your issue (now the brewed Python will be found before the system Python). – Dustin Wheeler Feb 19 '16 at 19:22
  • I suppose the same, because during the past November I remember that I installed a new version of Python 2.x using a package downloaded from the official site. Anyway, I'm going to check the content of the files that you suggested! – rudicangiotti Feb 19 '16 at 19:31
0

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 and brew 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 type python at the command line, the system will execute whatever version of Python it finds first in the PATH. In your case, it's the 2.7 version in /Library/Frameworks/. You can uninstall that version using the instructions here, replacing instances of 3.x with 2.7. Regardless of whether or not you keep that installation, you can ensure that python directs to the "Homebrew-ed" version by making sure that /usr/local/bin occurs before /Library/Frameworks/... in your PATH.

In other words, remove the statement:

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" 
export PATH

from your .bash_profile, or change the first line to:

PATH="${PATH}:/Library/Frameworks/Python.framework/Versions/2.7/bin" export PATH

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 with which -a python, which lists all binaries named python in your PATH.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .