Pip freeze into requirements.txt

When I do “pip freeze > requirements.txt” I get so many irrelevant packages.
Is there a way to get all the packets I installed?

Same here, this is because of the replit so I would suggest you derive your requirements from poetry either by hand or make a script for it,

Clean up poetry. Remove all unneeded packages from pyproject.toml then run poetry update. This should clean up a lot of the packages.

How do I run poetry update?

In the shell type poetry update XD. But make sure you clean up pyproject.toml first.

Edit: you probably should run pip freeze --exclude poetry > requirements.txt instead.

1 Like