Skip to content

Commit

Permalink
Add a new post on poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
dandyrilla committed Jun 5, 2024
1 parent 9df7a37 commit 7fb4374
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions _posts/2024-06-06-poetry.md
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
```

0 comments on commit 7fb4374

Please sign in to comment.