1

having some trouble getting Python 3.5 to run. I am running a brand new version of Sierra. I installed Python 2.7.12 and 3.5 through Brew, however when I run

> python --version
> Python 2.7.12

> echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I currently have the Python 2.7.12 and 3.5 versions stored in /usr/local/Cellar.

Struggling to run Python 3 over Python 2.

JMH
  • 193
  • 2
  • 4
  • 16
  • Did you try to run `python3.5` – idjaw Oct 02 '16 at 22:04
  • I can do so and run Python 3 in the terminal, however it runs as Python 2.7 when I'm working in a text editor – JMH Oct 02 '16 at 22:12
  • Because your text editor is configured to use that version of Python. You need to see how you can change that through your editor, to point to the version you want to choose. For example, I use PyCharm and I bounce between Python 2.7, 3.4 and 3.5 all the time. – idjaw Oct 02 '16 at 22:13
  • Guess I was looking for how I would be able to make Python 3 the default and then toggle into Python 2.7 when necessary? – JMH Oct 02 '16 at 22:22
  • Read [this](http://stackoverflow.com/questions/18425379/how-to-set-pythons-default-version-to-3-3-on-os-x) and [this](http://stackoverflow.com/questions/34528107/how-do-i-make-python-3-5-my-default-version). Not *exactly* what you're looking for, but will give some insight. Furthermore, watch out, there is an answer in the second link that suggests uninstall Python 2.7. Never do that. The system version of Python (2.7) is needed by OSX. – idjaw Oct 02 '16 at 22:28
  • 1
    Thank you for that, very much appreciated! – JMH Oct 04 '16 at 02:06

0 Answers0