-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9df7a37
commit 7fb4374
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
layout: post | ||
title: "poetry 를 이용한 패키지 의존성 관리" | ||
description: 파이썬 패키지 의존성 관리를 손쉽게 할 수 있는 poetry 사용법에 대하여 알아봅니다. | ||
tags: [poetry] | ||
comments: true | ||
share: true | ||
--- | ||
|
||
### Step 1. poetry 설치 | ||
|
||
다음의 명령어를 통하여 poetry 를 설치한다. | ||
|
||
```bash | ||
curl -sSL https://install.python-poetry.org | python - | ||
``` | ||
|
||
``` | ||
Retrieving Poetry metadata | ||
# Welcome to Poetry! | ||
This will download and install the latest version of Poetry, | ||
a dependency and package manager for Python. | ||
It will add the `poetry` command to Poetry's bin directory, located at: | ||
/home/ubuntu/.local/bin | ||
You can uninstall at any time by executing this script with the --uninstall option, | ||
and these changes will be reverted. | ||
Installing Poetry (1.8.3): Done | ||
Poetry (1.8.3) is installed now. Great! | ||
You can test that everything is set up by executing: | ||
`poetry --version` | ||
``` | ||
|
||
위의 안내에 따라 poetry 가 제대로 설치되었는지 버전을 한번 출력해 본다. | ||
|
||
```bash | ||
poetry --version | ||
``` | ||
|
||
poetry 1.8.3 버전이 설치되었음을 확인할 수 있다. | ||
|
||
``` | ||
Poetry (version 1.8.3) | ||
``` | ||
|
||
|
||
### Step 2. 필요 패키지 설치 | ||
|
||
프로젝트 폴더에 `pyproject.toml` 및 `poetry.lock` 파일들이 잘 설정되어 있다면, | ||
아래의 명령어를 통해 환경에 필요한 패키지들을 한꺼번에 설치할 수 있다. | ||
|
||
``` | ||
poetry install --no-root --no-dev | ||
``` |