Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.8 KB

File metadata and controls

65 lines (47 loc) · 1.8 KB

Python

Python Installation

(1) Pyenv method

brew install pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.config/zsh/env.sh
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.config/zsh/env.sh
echo 'eval "$(pyenv init -)"' >> ~/.config/zsh/env.sh

source ~/.zshrc

pyenv install --list
pyenv install 3.12.2
pyenv global 3.12.2
pyenv rehash

(2) Homebrew method

  • brew install python
  • Upgrade dependencies after install python3 -m pip install --upgrade pip setuptools wheel

Usage

  • python3 --version
  • python --version

Project creation - dependency Management

Virtual Environment (virtualenv) method

Reference