0

Completely clueless non-programmer here.

I followed the top answer in this link last night to remove Python 2.7, because I want my Mac to stop running 2.7 and start running 3.5.

But now, it won't run any Python scripts at all.

I tried to reinstall both Python 2.7.12 and Python 3.5.2 using the official packages they provide on Python.org, but nothing works.

Python files that used to run fine now won't build in Atom, Sublime Text 3, and Python's Launcher and IDLE.

The error message is always something like this:

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't find '__main__' module in ''
[Finished in 0.1s with exit code 1]
[shell_cmd: python -u ""]
[dir: /Applications/Sublime Text.app/Contents/MacOS]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

How can I fix this?

Community
  • 1
  • 1
  • The comments of the question you linked say not to remove the OSX default Python installation: _"Python 2.7 is the default system Python on recent systems, while on 10.6.4 it was 2.6 and 2.7 was user-installed. DO NOT UNINSTALL 2.7 FROM A RECENT OS X SYSTEM."_ Maybe you have to reinstall Python from OSX natively ? p.s. I'm not an OSX user. – Marcs Oct 29 '16 at 14:41
  • Thanks. I'll look into that. – Brian Hsi-Lin Ho Oct 31 '16 at 12:18

0 Answers0