Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Does Python package management suck or is it just me?
3 points by sysk on Oct 30, 2014 | hide | past | favorite | 3 comments
I have been learning Python for the past few days and absolutely love the language but I just can't wrap my head around package management. Here's a few keywords I've stumbled upon trying to learn how package management is done: easy_install virtualenv pip setuptools distutils pypi wheel egg site-packages

Compare this with Node's npm and package.json. I'm almost considering giving up Python at this point just due to the apparent complexity of package management.

Is it just me? Is it not such a big deal in practice? Anyone else coming from Node.js land got confused by Python's package system?



Have you read the packaging tool recommendations[1]? And the packaging glossary[2]?

For the little of npm I've seen its equivalent is pip, and package.json maybe pip's requirements files.

[1] https://packaging.python.org/en/latest/current.html [2] https://packaging.python.org/en/latest/glossary.html


Thanks for those links, they do a better job at explaining those various tools then most descriptions I've read so far.

So if I understand correctly, the usual workflow is to create a distribution for your source code using setuptools (python setup.py sdist) and then upload them to Pypi using (python setup.py upload) or using Twine (twine upload dist/*). The uploaded distributions can then be installed by third party users by using pip (pip install somedistname).


You are welcome, glad that they were helpful. My recommendation going forward: try the official documentation first always, it is of very high quality.

* You are right on the usual workflow

* I haven't used Twine so I can't comment on it

Additional things you might want to look into:

* Using ssh[2] to upload to PyPI

* Signing distributions with OpenPGP

[1] http://buildout.org

[2] https://pypi.python.org/pypi/pypissh




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

Search: