python 설치
python2 지원 종료,python2 시리즈의 EOL
mac os 기본 설치되어 있음
지원종료 안내:
2020.1.1. 부로 python2의 지원을 중단함. 이후에는 더 이상 더이상 버그 리포트나 수정, 지원 등 개선 작업이 이루어지지 않으므로 빠른 시일내에 python3로 넘어갈 것을 제안하고 있음
이전 버전에 작성된 코드를 돌리는 것이 아니라면 python3를 설치하는게 좋을 것으로 보임
We are volunteers who make and take care of the Python programming language. We have decided that January 1, 2020, was the day that we sunset Python 2. That means that we will not improve it anymore after that day, even if someone finds a security problem in it. You should upgrade to Python 3 as soon as you can.
As of January 1st, 2020 no new bug reports, fixes, or changes will be made to Python 2, and Python 2 is no longer supported.
비고: 2000년에 python2가 개발되고 나서 큰 개선점을 발견하여 2006년 python3를 출시했으나 python2 이용자들을 위해 python2와 3을 동시에 유지시켜왔다. python3의 새롭고 좋은 기능들에도 불구하고 이용률이 저조하고, 인력의 한계 때문에 python3의 개선에 집중하기 위해 2015년 중단(EOL: End of Life)을 공지하고 빠른 시일내에 python3으로 업그레이드 할 것을 권고했다. 그러나 여전히 많은 이용자가 python2를 사용하고 있었고, 이에 따라 python2.x시리즈의 서비스 중단을 2020년으로 연기하였다.
https://www.python.org/doc/sunset-python-2/
https://www.python.org/dev/peps/pep-0373/
python3 설치
1. 홈페이지
https://www.python.org/downloads/
버전설정:
pkg
2. terminal 이용
homebrew
pip install
pip upgrade
홈브류 설치
https://whitepaek.tistory.com/3
path 설정
가상환경 구축
---------------- konlpy 설치와 오류 --------------
konlpy설치하기
xcode, jdk(java developement kit)의 사전 설치 필요
tag module 중에서 mecab(형태소분석기)는 별도로 설치해줘야 함
https://joyae.github.io/2020-10-02-Mecab/
mac에서 사용할 때 오류 발생 mecab 설치 시 tweepy 버전 오류
오류 :tweepy 4.0 버전 업데이트에 의한 오류 (21.10월 기준)
해결: pip install tweepy == 3.10.0 명령어로 tweepy 버전 재 다운로드 후 해결
from konlpy.tag import Mecab
tokenizer=Mecab()
tokenizer.morphs("분석할 문장")
정상작동하는 것을 확인
https://github.com/hexists/konlpy/wiki/konlpy-X-m1-silicon
https://joyae.github.io/2020-10-02-Mecab/
---------- jupyter notebook 설치와 가상환경 사용하기 ---------------
가상환경 구동하고 주피터 노트북 실행한다고 노트북에서 가상환경으로 사용할 수 없음
커널을 만들어 줘야함
python -m ipykernel install --user --name 가상환경이름 --display-name "노트북에표시할이름"
참고: https://chancoding.tistory.com/86
'IT > Python' 카테고리의 다른 글
[python openCV, cv2] src.emtpy() in function ... (0) | 2021.05.27 |
---|---|
Fatal error in launcher: Unable to create process using ... (0) | 2021.05.12 |
[Deeplearning] LOGISTIC REGRESSION CODE REVIEW-1 (0) | 2021.05.05 |
[Basic] 문자열 자료형-문자 표시하기: Format을 이용한 포매팅 (0) | 2021.04.28 |
Python Package, Module, Library 차이 (0) | 2021.04.14 |