[Install] Python Package - fastapi, konlpy, tensorflow

gpg·2023년 8월 26일
0

macOS

목록 보기
2/10

List

최종 수정일 : 2023.08.26(토)

  • FastAPI
  • Uvicorn
  • konlpy
  • tensorflow

FastAPI / Uvicorn

#FastAPI 0.97버전 - pydantic v1 사용을 위함
pip install fastapi==0.97.0

#FastAPI 동작을 위해 필요한 라이브러리 - 보통 같이 사용함
pip install uvicorn
#파이썬에서 사용 가능해짐
from fastapi import FastAPI
#동작 확인 - 로컬서버 띄워서 확인
#src 디렉토리에서 확인
cd src

#일반 서버 구동
uvicorn main:app

#코드 변경 시 서버 재구동
uvicorn main:app --reload






Konlpy

# 방법 (1)
pip install konlpy

# 방법 (2) - 위 명령어 실행 시, jpype1 등 문제로 error 발생 시
conda install -c conda-forge jpype1   #먼저 명령 후에 다시 설치
pip install konlpy





Tensorflow

conda install -c apple tensorflow-deps    # tensorflow dependencies 설치
pip install tensorflow-macos              # tensorflow 설치
pip install tensorflow-metal              # TensorFlow-Metal (GPU framework) 설치
profile
[Code.ZIP] macOS - install, setting, tutorial

0개의 댓글