

Ask HN: Does Python package management suck or is it just me? - sysk

I have been learning Python for the past few days and absolutely love the language but I just can&#x27;t wrap my head around package management. Here&#x27;s a few keywords I&#x27;ve stumbled upon trying to learn how package management is done: easy_install virtualenv pip setuptools distutils pypi wheel egg site-packages<p>Compare this with Node&#x27;s npm and package.json. I&#x27;m almost considering giving up Python at this point just due to the apparent complexity of package management.<p>Is it just me? Is it not such a big deal in practice? Anyone else coming from Node.js land got confused by Python&#x27;s package system?
======
servilio
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](https://packaging.python.org/en/latest/current.html)
[2]
[https://packaging.python.org/en/latest/glossary.html](https://packaging.python.org/en/latest/glossary.html)

~~~
sysk
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).

~~~
servilio
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](http://buildout.org)

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

