After changes to Python formulae, 3rd party applications no longer work

(Workflowsguy) #1

I have several 3rd party applications that depend on “Python” being “Python 2”.
After the latest changes to brew’s Python formulae, those applications no longer work.

I need to get those applications working again as soon as possible. What can be done here?



(Mike McQuaid) #2

Check brew info python@2 for PATH changes you can make.

(Workflowsguy) #3

I just tested this.
The suggestion to prepend the path to python@2 to PATH has no effect on this issue, as this won’t change “Python” back to meaning “Python 2”

(Mike McQuaid) #4

It will if you add the libexec to your PATH.

(Workflowsguy) #5

Could you please elaborate or point me to some documentation?

(Mike McQuaid) #6

If you run brew info python@2 and read it all you will see the documentation.

(Mike McQuaid) #7

Note: we are changing the behaviour of Python 2 and 3 tomorrow: Python and PEP 394

(Workflowsguy) #8

However, the Python2 formula and brew info python@2 contain different (and - for me - confusing) statements.


If you need to have this software first in your PATH run:
echo ‘export PATH="/usr/local/opt/python@2/bin:$PATH"’ >> ~/.bash_profile

brew info python@2

If you wish to have this formula’s python executable in your PATH then add
the following to ~/.bash_profile:
export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"

I have now changed the PATH to the latter and rebooted, but 3rd party apps still complain about missing Python 2.