python installation failed

I've just started to learn python and have been trying to install it on my mac with the official installer from python.org (python 3.11).


When running the installation it ends with the message "Installation failed"


Has anyone else had this problem? Tried installing older python versions and I get the same result.

MacBook Pro 13″, macOS 13.0

Posted on Nov 9, 2022 05:16 AM

Reply
1 reply

Nov 9, 2022 06:02 AM in response to Alzor

Hi,

You'd better install Python3 with Homebrew + pyenv.

1) Install Homebrew


$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"


2) Install pyenv


$ brew install pyenv


3) modify ~/.zshrc


$ export PYENV_ROOT=”$HOME/.pyenv”
$ export PATH=”$PYENV_ROOT/bin:$PATH”
$ eval “$(pyenv init -)”


4) Install Python


$ pyenv install 3.8.3

Try to install Python version 3.8.3, if you want to other version of Python, check with,

$ pyenv install --list

5) Check if Python 3.8.3 is installed successfully.

$ pyenv versions
 * system (set by /Users/master/.pyenv/version)
  3.8.3

That's all.
Hope this help you.



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.

python installation failed

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