[PYTHON] I want to install a package from requirements.txt with poetry

Overview

I used to manage packages in existing projects with requirements.txt, but a memo when installing the package as it is with poetry Poetry cannot be installed directly from requirements.txt

Solution

If you are not in a poetry environment, init first

poetry init

Turn the contents of requirements.txt with a for statement and add poetry one by one.

for package in $(cat requirements.txt); do   poetry add "${package}"; done

reference

https://github.com/python-poetry/poetry/issues/46

Recommended Posts

I want to install a package from requirements.txt with poetry
I want to install a package of Php Redis
I want to pip install with PythonAnywhere
I want to make a game with Python
I want to write to a file with Python
I want to transition with a button in flask
I want to find a popular package on PyPi
I want to work with a robot in python.
I want to split a character string with hiragana
I want to manually create a legend with matplotlib
I want to run a quantum computer with Python
I want to bind a local variable with lambda
I made a package to filter time series with python
I want to make a blog editor with django admin
I want to start a jupyter environment with one command
I want to start a lot of processes from python
I want to tell people who want to import from a higher directory with Python direnv
I want to make a click macro with pyautogui (desire)
Steps to install a Git cloned package locally with pip
I want to make a click macro with pyautogui (outlook)
I want to use a virtual environment with jupyter notebook!
I want to send a message from Python to LINE Bot
I want to do ○○ with Pandas
[Visualization] I want to draw a beautiful graph with Plotly
I want to debug with Python
I want to use a wildcard that I want to shell with Python remove
I want to do a full text search with elasticsearch + python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I want to make a parameter list from CloudFormation code (yaml)
I want to mess with ALB's default security group from CDK
I want to detect objects with OpenCV
I want to print in a comprehension
How to add a package with PyCharm
I want to blog with Jupyter Notebook
I want to use jar from python
I want to build a Python environment
How to install a package using a repository
I want to analyze logs with Python
I want to play with aws with python
I can't install the package with pip.
I want to send a signal only from the sub thread to the main thread
(Matplotlib) I want to draw a graph with a size specified in pixels
[Python memo] I want to get a 2-digit hexadecimal number from a decimal number
I came up with a way to make a 3D model from a photo.
I tried to send a registration completion email from Gmail with django.
I want to make matplotlib a dark theme
I want to connect to PostgreSQL from various languages
I want to easily create a Noise Model
I want to use MATLAB feval with python
Install Windows 10 from a Linux server with PXE
I want to analyze songs with Spotify API 2
I want to INSERT a DataFrame into MSSQL
I want to create a window in Python
I want to email from Gmail using Python.
[Python] I want to manage 7DaysToDie from Discord! 1/3
I want to mock datetime.datetime.now () even with pytest!
I want to display multiple images with matplotlib.
I want to knock 100 data sciences with Colaboratory
I wanted to install Python 3.4.3 with Homebrew + pyenv
I want to be an OREMO with setParam!
I don't want to take a coding test