YUYANE

Django / Poetry로 가상환경 만들기 본문

Framework/DJANGO

Django / Poetry로 가상환경 만들기

YUYA 2022. 9. 21. 21:29

학습 강의

https://nomadcoders.co/airbnb-clone/lectures/3837

 

All Courses – 노마드 코더 Nomad Coders

초급부터 고급까지! 니꼬쌤과 함께 풀스택으로 성장하세요!

nomadcoders.co

 

 

Poetry

 

파이썬 패키지를 설치하고 관리할 수 있게 해주는 도구

 

1) 윈도우에 Poetry 설치하기

 

https://python-poetry.org/docs/

 

Introduction | Documentation | Poetry - Python dependency management and packaging made easy

If you installed using the deprecated get-poetry.py script, you should use it to uninstall instead: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --uninstall

python-poetry.org

 

위 사이트에 가서 Installation 부분 확인하기

커맨드창을 열고 아래 코드를 입력 후 엔터를 누르면 poetry 설치가 진행된다.

* 마이크로소프트 스토어에서 파이썬을 설치한 경우에는 py를 python으로 바꾸어 입력한다.

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -

 

 

2) Poetry로 가상환경 만들기

poetry init

 

 

3) Poetry로 가상환경에 패키지 추가하는 명령어

poetry add

ex. poetry add django

 

 

4) Poetry 실행하여 가상환경 시작하기

poetry shell

 

 

5) Poetry 권한 관련 오류 시 참고 사이트

 

https://samsons.tistory.com/16

 

[PowerShell] 스크립트 실행 시 오류(UnauthorizedAccess), (PSSecurityException)

+ CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess ----------------------------------------------------------- ※관리자권한으로 PowerShell 실행해야..

samsons.tistory.com

 

Comments