% python zsh: command not found: python% python3xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
% python3.9Python 3.9.14 (main, Sep 6 2022, 23:29:09) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwinType "help", "copyright", "credits" or "license" for more information.>>>
#! /usr/bin/env python
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrunError: python@3.10: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install
env: python: No such file or directory
% sudo ln -s /usr/bin/python3 /usr/bin/python
ln: /usr/bin/python: Operation not permitted
% ln -s /usr/bin/python3 /usr/local/bin/python
% pythonxcode-select: Failed to locate 'python', requesting installation of command line developer tools.
To run your script from the Finder you have two options:Drag it to PythonLauncherSelect PythonLauncher as the default application to open your script (or any .py script) through the finder Info window and double-click it. PythonLauncher has various preferences to control how your script is launched. Option-dragging allows you to change these for one invocation, or use its Preferences menu to change things globally.
The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively.
python3 is not included in Ventura, but it can be added by installing the command-line tools with: Code: [Selecteer]xcode-select --install(https://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/), and after installation, it has the benefit of being updated with macOS updates
xcode-select --install
https://discussions.apple.com/thread/254320722
... al je scripts die python aanroepen in plaats van python3 werken dan nog steeds niet … Een oplossing daarvoor heb ik nog altijd niet gevonden.
Add the following alias at the bottom of the .zshrc file:Code: [Selecteer]alias python=/usr/local/bin/python3
alias python=/usr/local/bin/python3