0

I am trying to link python2.7 to the most recent brew install, which corresponds to python 2.7.13. I know of answers like this link python with brew. But it's still confusing for me.

What I need is to have python2.7 link to /usr/local/Cellar/python/2.7.13/bin/python2.7. I can achieve python to link to /usr/local/Cellar/python/2.7.13/bin/python2.7.

The problem is I have scripts that call python2.7 and no matter what I do it always returns the old MacOS installation of python2.7.5.

I have also tried brew link --overwrite python@2 but the same thing happens.

Ideally I would like python to link to python3.6 and python2.7 to link to python2.7.13

Community
  • 1
  • 1
PepperoniPizza
  • 8,842
  • 9
  • 58
  • 100
  • this sounds hacky but how about a `symlink` of the old python installation with the new one – eagle Apr 18 '18 at 17:51

1 Answers1

1

Try to use virtual environment for your script virtual environment Doc

ME_sociaty
  • 97
  • 1
  • 10