brew doctor warning about Python config scripts Can someone please explain what I should do about the following warning from Homebrew:

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:

/opt/local/bin/python-config
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config


Aren't these the original Python config files installed by OS X? If so, surely I shouldn't delete them? Are python-config and Python2-config required if I only use Python 2.7? Should I change my $PATH which is:

Oliviers-iMac:~$ echo $PATH
/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/System/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin


UPDATE:  I successfully uninstalled Macports and removed /opt/local/bin:/opt/local/sbinfrom my $PATH, but I'm still getting the following warning:

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:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config


How do I fix this? Thank you in advance.
The main thing it to be sure your chosen version of python is first in the path as we transition away from python 2 on macOS. 

Until you have a broken package, this is a warning and not an error, so just post your next build error with some details and we might be able to help if you have an actual problem. Also, if you have disabled SIP and changed your base OS, maybe test a clean install onto USB external drive, validate this warning doesn’t exist when you boot to the new OS and then try migrating your data over, this could just be your system isn’t “stock” enough.