개발환경설정
Mac OS Python 설치 및 환경설정
삽질중
2024. 4. 4. 11:28
https://www.python.org/downloads/macos/
Python Releases for macOS
The official home of the Python Programming Language
www.python.org
1. 터미널 실행
2. 현재 PATH 확인
echo $PATH
/opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/bin/python3
빨강색으로 표시된 부분이 없으면 추가해준다.
~/.zshrc
//제일 하단에 추가
export PATH=$PATH:/usr/local/bin/python3
환경변수 적용
source ~/.zshrc