0

I updated macOS to the new version Ventura 13.1 and python has stopped working

/Users/myuser/Library/Python/3.8/bin/pre-commit: /Library/Developer/CommandLineTools/usr/bin/python3: bad interpreter: No such file or directory

Running python3 from any directory works, but I don't really understand the error after the update

python3
Python 3.11.1 (v3.11.1:a7a450f84a, Dec  6 2022, 15:24:06) [Clang 13.0.0 (clang- 
1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
  • Did you install the command-line tools after updating? – tadman Jan 16 '23 at 00:46
  • Note that [MAC](https://en.wikipedia.org/wiki/MAC_address) means something very specific, and it's not the type of computer. – tadman Jan 16 '23 at 00:46
  • @tadman I did not install anything else, I thought it would continue working as before, what should I install? – Hernandez91 Jan 16 '23 at 00:47
  • Usually you need to update XCode, and then install the associated "Command Line Tools" package. – tadman Jan 16 '23 at 00:48
  • 2
    xcode-select: note: install requested for command line developer tools, ok, I understand, you're right, I'm installing! – Hernandez91 Jan 16 '23 at 00:51
  • 1
    You may prefer using the [Homebrew](https://brew.sh) version as that often decouples your Python installation from your OS, and you can pick specific versions to install as well. – tadman Jan 16 '23 at 00:52
  • 1
    @tadman Everything works now! Thank you very much, if you want leave the answer to mark it so it can be useful for others! – Hernandez91 Jan 16 '23 at 01:13
  • Probably easiest to add a self-answer with what you did. – tadman Jan 16 '23 at 02:30

0 Answers0