-
Solution - 1
- "poetry doesn't support this directly. But if you have a handmade list of required packages (at best without any version numbers), that only contain the main dependencies and not the dependencies of a dependency you could do this:"
cat requirements.txt|xargs poetry add
- "poetry doesn't support this directly. But if you have a handmade list of required packages (at best without any version numbers), that only contain the main dependencies and not the dependencies of a dependency you could do this:"
-
Solution - 2
- Another Solution
for item in $(cat requirements.txt); do poetry add "${item}"; done
- Another Solution
-
Solution - 3
- A solution that prints out all requirements without version numbers; After dependencies are printed out, copy, paste, and run all poetry add commands
cat requirements.txt | grep -E '^[^# ]' | cut -d= -f1 | xargs -n 1 echo poetry add
- A solution that prints out all requirements without version numbers; After dependencies are printed out, copy, paste, and run all poetry add commands
Last active
October 24, 2020 18:57
-
-
Save joeld1/aa749491a44275fd63c098cc88f43034 to your computer and use it in GitHub Desktop.
Notes on ways to import requirements.txt files into Poetry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment