I cannot install Python 3 on a new MacBook Pro

I can not install python 3 on a new MacBook Pro. Any tips?


[Re-Titled by Moderator]

MacBook Pro Apple Silicon

Posted on Jan 30, 2023 08:57 AM

Reply
2 replies

Jan 30, 2023 10:05 AM in response to nannette50

There are two alternative approaches to installing Python3 and you must be the administrator to do so in either case:


This:


Download the current universal binary macOS Python3 installer (3.11.1) from Python.org. It is a proper package installer and will create a Python 3.11 folder in your /Applications folder, /usr/local/bin/python3, /usr/local/bin/idle3 and /usr/local/bin/pip3 with links to the /Library/Frameworks/Python.framework/Versions/3.11/bin/binaries.


Change your Shell PATH to:

export PATH=".:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:${PATH}"


and preface your Python scripts with:


#!/usr/bin/env python3


Or…


Install the XCode CommandLine Tools from the Terminal. This does not install Xcode. It does install Python3 (3.9.6),

idle3, and pip3 into /usr/bin. It also installs clang, clang++, and swiftc compilers along with swift.

./xcode-select --install



Same script preface as above.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I cannot install Python 3 on a new MacBook Pro

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.