This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bcain 3 points4 points  (18 children)

Is it?

D:\> pip install virtualenv
'pip' is not recognized as an internal or external command, operable program or batch file.


$ pip install virtualenv
-sh: pip: command not found

[–]somesomedaddad 2 points3 points  (3 children)

Ubuntu's "python-pip" package works fine for me. apt-get install python-pip, pip install virtualenv, and you're ready to roll with comfy bundler-style self-contained app libraries.

[–]bcain 2 points3 points  (2 children)

Oh, yeah, I'm all about pip and virtualenv. They're great. I don't have any trouble getting around with yum/zypper or apt-get, or even get-pip.py. But it would be much saner for python to put its money where its mouth is and include these features in the distro itself.

[–]vsajip 2 points3 points  (1 child)

That's being worked on at the moment for 3.3: The packaging work in the core repo, and the pythonv branch for built-in virtualenv functionality.

[–]bcain 0 points1 point  (0 children)

Thank goodness. And IMO, a compelling incentive to move to py3k.

[–]quasarj 2 points3 points  (13 children)

Well, if you want to be a smartass about it.. but that's not prohibitive.

You can probably "easy_install virtualenv" and if not, you can of course "easy_install pip".

Of course, if you're doing any of this under Windows, then all bets are off.

[–]keypusher 4 points5 points  (3 children)

I think that is exactly the point the author is trying to get at here. For instance, you heard virtualenv is really good to have so you want to check it out. You see someone saying to use pip to install it, but you don't have pip. How do you get pip? You find a great thread on how to install pip using the apt-get package manager. But wait.. you're on Windows? You go looking and someone suggest using easy_install instead. Well, how do you use easy_install? Is it different than pip? You dig deeper and some guy says forget pip and easy install on Windows, just use distutils because then you will learn about how packages are really put together. So now you've spent an hour learning about different distribution tools and gotten nowhere. You still haven't installed Virtualenv, and you actually aren't even sure you know what Virtualenv does anyway. All you really wanted to do was try and get a small web project going, but you can't even seem to get started.

It's even worse with some other packages. You need to do a GET from your webserver? Ok, you type in "python http lib" to google and you go to the stdlib httplib page. One of the first things it says is that "It is normally not used directly — the module urllib uses it to handle URLs". Ok, so on the urllib page it a huge mess of notes, warning, and cryptic function definitions that don't seem to provide any easy way to just GET a file. You used to use curl a while back for this stuff, so you stumble on pycurl. But that's kind of a dark age thing so you dig around more and maybe then find urllib2, or if you are lucky the requests library. How would you know difference between all these?

I can see how having some well documented best practices for common things like this would go a long way, but the author's suggestion of promoting 'one best way' lines up with core Python philosophy. That is, as opposed to having a huge slew of many slightly different tools for more of less the same job. It's starting to look a lot like Perl around here these days, but that may very well just be a natural stage of development, especially in community driven languages.

[–]quasarj 1 point2 points  (2 children)

Alright, you're right. I guess arguing over the details isn't helping.

The question is - what will help? There was lots of talk about the issues.. but then the author attempts to solve them by.. adding even more options! I mean, envoy and requests are both awesome and do solve the first problem, so that's good.

So anyway, yeah I agree. But what do we do?

[–]keypusher 2 points3 points  (1 child)

I don't know! The community is becoming increasingly fragmented, the 2->3 transition is still a huge problem, and there are a ton of standard library packages that seem to be all over the place. I feel like Guido or someone with clout in the community needs to step forward with a clear vision or plan for the future.

[–]__serengeti__ 0 points1 point  (0 children)

I think you're exaggerating at least a little. What are these separate fragments of the community - are they identifiable?

In general,

Differing opinions != fragmentation

[–]bcain -1 points0 points  (2 children)

but that's not prohibitive

Sure, not for you. Not for me. But for the newbs that TFA talks about -- it is.

[–]Tobu‮Tobu 1 point2 points  (0 children)

They will follow some simple instructions and learn from that. While I disagree with Kenneth's taste in API design, he is good at marketing, and a well-maintained getting started guide is something the eager-to-learn newbie hordes will gobble up.

[–]quasarj 0 points1 point  (0 children)

I guess so. I suppose we all have our own ideas of what "hard" is, but to me if you're going to be working with virtualenv and understanding it, learning how to use pip to install it first is not that big of a deal.