Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

create requirements file from project add them to poetry dependency

# from same dir where the python file is located
python3 -m pipreqs.pipreqs --savepath=requirements.in

python3 -m piptools compile requirements.in

poetry init

#use this , this will read the package names and not the comments
poetry add $( cat requirements.txt| grep -v '#')

#or this
cat requirements.txt|grep -v '#'|xargs poetry add
 
PREVIOUS NEXT
Tagged: #create #requirements #file #project #add #poetry #dependency
ADD COMMENT
Topic
Name
5+5 =