Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    $ poetry init
    $ poetry add django
    $ poetry shell
It's pretty simple. Check in the lock file, and then run

    $ poetry install 
to replicate it.

> - Use pip freeze > requirements.txt as a "lockfile".

There's lots of reasons to not do this anymore, and Dependency Hell is real, and has been for 25 years with RedHat RPM's, etc.

Even if you don't want to rely upon poetry for building in prod, poetry can still export a requirements.txt file for you, so you're not locked into using poetry, but you still get to specify the high level packages you want, and let it solve the dep graph for you.



> There's lots of reasons to not do this anymore, and Dependency Hell is real

If you want to be relaxed about dependencies, you can use "pip-chill".

    pip install pip-chill
    pip-chill > requirements.txt
And, if you are even more relaxed,

    pip-chill --no-version > requirements.txt




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: