Hacker News new | ask | show | jobs
by 100k 5158 days ago
This has kind of happened in Ruby, too.

Fortunately, Ruby gems are super easy to install and the standard library got some much-needed spring cleaning in 1.9.

Python could use the same. There have been many times where I've wanted to do some simple task that would be made easier with an external library (like Requests) but I'm not going to bother dealing with the Python module install pain for a one-off task.

4 comments

> the Python module install pain for a one-off task.

"pip install requests" ?

Unfortunately, it seems the official documentation on installing Python modules[0] makes absolutely no mention of pip or even easy_install. Seems like something that should be there, right?

[0]: http://docs.python.org/install/

I guess that is because pip is not part of the official Python. Maybe best described as a front-end to distutils (which is what your link documents and is part of official Python).

edit: Python docs front-page[1] also notes following:

A new documentation project, which will be merged into the Python documentation soon, covers creating, installing and distributing Python packages: http://guide.python-distribute.org/

[1] http://www.python.org/doc/

So I guess that they have acknowledged that the docs are suboptimal currently in this part.

I'm glad that there's no mention of easy_install. I have no idea why someone would want to use a package manager that can't uninstall things.
Yeah, good point. That puzzled me as well before I learned of pip.
I tend to use pip, requirements file, and virtualenv. No real trouble.
I find the opposite. Installing a useful module for a once-off task is a no brainer, since I won't have to worry about whether I'm introducing some long-term dependency I'll have to maintain.

The real issue is in discovering that a better option exists in the first place.

And then you have to deploy it to the server or someone else's computer and it sucks.
pip freeze works even without virtualenv. Expunge things you know don't matter, and send to third party/deploy, which then just has to run pip install -r requirements.txt.
Python has had a lot of cleaning in 3, but everyone is screaming about how 3 doesn't work just like 2 so I guess you just can't satisfy everyone.
If anyone was wondering (Like I was) what was dropped from the standard lib, this looks to be the list:

http://www.python.org/dev/peps/pep-3108/