본문 바로가기

Python

pip3 사용하기

https://evansdianga.com/install-pip-osx/

 

Installing Python 3 and Pip on Mac OS | Evans Dianga

Apple’s Mac OS comes with python 2.7 installed by default. Perhaps you may want to use python 3.x.x on your machine and also use pip for package management with python 3.x.x. The easiest way to achieve this is by: NOTE: This tutorial does not use Virtual E

evansdianga.com

 

python 3를 다운받고

 

cd /Library/Frameworks/Python.framework/Versions/3.6/bin/python3

python 3 경로에서

 

get-pip.py 다운

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

 

get-pip.py 실행

python get-pip.py

 

pip3를 이용해서 파이썬 패키지 다운.

pip3 install xyz-package

 

pip3 대신 pip로 pip3를 사용하고 싶다면

 

vi ~/.bash_profile 또는 vi ~/.zshrc 에서 alias 등록

 

alias python='python3'

alias pip=pip3

 

alias 등록 후 터미널 다 껐다가 켜야 함.

'Python' 카테고리의 다른 글