Install Python on a Mac

Install Command Line Tools





  • open a terminal session
  • enter the following command
xcode-select --install




Install Homebrew





  • navigate to brew.sh
  • copy the installation script
  • open a terminal session
  • paste the installation script into your terminal session
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"




Install Pyenv





  • open a terminal session
brew install pyenv




  • add pyenv to your .bash_profile
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.bash_profile




  • add this PATH to your zsh config
echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc




  • restart your terminal session


Подробнее
[fixed][/fixed]