Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Jupyter
- centos
- appium server
- PYTHON
- Jupyter Notebook
- openpyxl
- STF_PortForwarding
- STF
- SWIFT
- kitura
- perfect
- nohup
- rethinkdb
- ssh
- postgres
- appium
- nGrinder
- sshpass
- 실행권한
- GoCD
- create table
- nmap
- Materials
- port forwarding
- postgresql
- 28015
- ubuntu
- ftp
- insert
- mysql
Archives
- Today
- Total
don't stop believing
Mac에 Python3.x 설치 (brew) 본문
Python.org에서 package를 다운받아 설치하다 brew로 모든 package를 관리하고 싶어졌습니다.
그래서 이번엔 brew를 이용해 python 3를 설치해 보겠습니다.
먼저 Home Brew 를 설치 합니다.
[http://dejavuqa.tistory.com/80]
brew가 설치 되었다면 python3를 설치해 봅시다.
1$ brew install python3
brew로 설치된 항목을 보고 싶다면 brew list로 보면 됩니다.
12$ brew listgdbm openssl pkg-config python3 readline sqlite xz
python3가 설치된 걸 볼 수 있습니다.
다시 터미널에서 python3의 버전을 확인해 봅니다.
12$ python3 --versionPython 3.6.3
python3 명령을 그냥 python으로 하고 싶다면 alias를 지정하면 됩니다.
pip3도 pip으로 호출하도록 alias를 적용합니다.
.bash_profile 파일을 열고 alias를 설정합니다.
1$ sudo vim ~/.bash_profile
첫 줄에 alias를 아래와 같이 추가합니다.
12345alias python='python3'alias pip='python3 -m pip'export PATH=/usr/local/bin:/usr/local/sbin:$PATHexport PATH
저장 후 파일을 닫습니다.
그리고 source로 등록합니다. 그런다음 다시 python 버전을 확인해 봅니다.
12345$ source ~/.bash_profile$ python --versionPython 3.6.3$ pip --versionpip 9.0.2 from /usr/local/lib/python3.6/site-packages (python 3.6)
Python 3.6.3으로 지정된 것을 확인할 수 있습니다.
'Python > Basic' 카테고리의 다른 글
파일 읽어서 다시 쓰기 (0) | 2018.03.05 |
---|---|
Windows에 Python 설치하기 2 (0) | 2018.01.30 |
Windows에 Python 설치하기 1 (0) | 2018.01.29 |
timestamp 출력 함수 (0) | 2017.12.27 |
Mac에 Python 3.x 설치 (package) (1) | 2017.10.18 |