0

enter image description hereWhy are there ‘Python’ and 'Python launcher’? What’s the difference?

"Python launcher" is in Applications/python 3.10/python launcher

“python” is in the MacintoshHD/library/frameworks/python.frameworks/resources/python app

I can't run python files that use modules using 'Python launcher' but can by using the ‘Python' app.

And I can run a python file from anywhere, maybe Desktop or in a folder or anything by using 'Python launcher’. But in the ‘Python' app, it either works on the Desktop or a specific place and is strictly not inside folders. (if I run, it's displaying an error as the directory cannot be found.)

The current version of python I use is 3.11 (I know only 3.10 is the most recent version. But I have accidentally downloaded a pre-release. It's the sixth of the seven alpha releases.)

4
  • These files do not come with macOS. How did you install these? More importantly what problem do you face if you can run the scripts you need with one of the tools?
    – bmike
    Commented Mar 29, 2022 at 17:21
  • @bmike, what is the difference between the python and python launcher app? I didn't mean IDLE. and the 3.11 I downloaded from official python site.
    – Tharushi
    Commented Mar 29, 2022 at 17:30
  • Well neither of those apps you show are 3.11 and the paths are not correct is it missing a / at the beginning and the second path has a space before app so is not a real path. Please cit and paste tyhe exact paths - and how did you install python 3.10
    – mmmmmm
    Commented Mar 29, 2022 at 17:53
  • I downloaded python from the python website. I just want to know are there two different apps called ‘python launcher’ and ‘python’ seperately ?
    – Tharushi
    Commented Mar 30, 2022 at 3:56

4 Answers 4

1

When Python is installed from Python Releases for macOS, apps for IDLE and Python Launcher are installed in a folder under Applications.

In Ventura (macOS 13.x) the python executable is placed in the system folder with its version, like so: /Library/Frameworks/Python.framework/Versions/3.10/Python

Python Launcher allows users to run scripts from Finder instead of having to use Terminal. To use this, you can either:

  • start the launcher app and drag scripts onto the launcher app's icon in the dock, OR
  • associate .py files with the launcher app (which would run the script upon double-clicking the script in finder).

To find how to associate files with the app, do a search on:
how to associate files with an app in macos

Note: Python Releases displayed with universal installer will work on both Intel and Mn (eg, M1, M2) Macs.

1

This question is quite old, but I ended up here after having the same question recently and ultimately came across this GitHub Gist with a few simple commands that remove the "Python Releases for macOS"/"Python Launcher.app" Python versions while not touching the macOS default version in /usr/bin/python3.

Below is the GitHub Gist quoted in its entirety at the time of writing for easy reference.

Note that you must change the version number in the below commands to match whatever version of Python Releases for macOS you have installed (you can find them by looking in the /Applications directory.)

1. DO NOT attempt to remove any Apple-supplied system Python which are in /System/Library and /usr/bin.
2. Multiple Python versions can coexist pacifically on macOS. So, uninstalling Python is purely optional.

To remove a different version, change 3.7 to the Python version you want to remove.

sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7
sudo rm -rf "/Applications/Python 3.7"
sudo find /usr/local/bin -lname '../../../Library/Frameworks/Python.framework/Versions/3.7/*' -delete
-1

See this answer and the Python documentation. In short, "Python" is responsible for the python command in Terminal (Python.app is symlinked to /usr/local/bin/python), while "Python Launcher" handles double-clicking Python files in Finder.

1
  • The Python documentation page you link to is very old and apart from sayin 3.9 (in 3.10 documentation) seems not to have been updated for many years (e.g. reference to ~/.Macos/Environment.plist which is pre Yosimite). It does explain PythonLauncher. But there is no explanation of Python.app
    – mmmmmm
    Commented Mar 30, 2022 at 10:03
-2

The Python launcher gets automatically installed during the installation of Python with the .dmg file. This launcher is actually bad i would recommend: uninstall Python and the python launcher.

Install Homebrew in (case you havn't already) and install python by typing brew install python

4
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Mar 29, 2022 at 21:14
  • The Python Launcher app might be useful if you do everything from the Finder and not the terminal, you can drop python files on it to run them. 9As I don't install python from python.org I don't actually have it)
    – mmmmmm
    Commented Mar 29, 2022 at 22:07
  • 2
    Making unsubstantiated statements like "this launcher is actually bad" is not helpful to the OP. The launcher is an official part of the Python distribution. Commented Mar 29, 2022 at 22:53
  • OK if you are familiar with the terminal i don't think you would need the Python launcher
    – fabolous05
    Commented Mar 30, 2022 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .