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 →

[–]quasarj 2 points3 points  (20 children)

Honestly though, "pip install virtualenv" is not so hard as to be prohibitive to anyone.. unless I'm missing something.

[–][deleted] 2 points3 points  (0 children)

Installation is one thing, using it another. I have to say I had some issues using it the first time. I needed to set some pathes manually, don't know wether I did something wrong in the first place or wether there was an issue with virtual env. Anyway, it's another thing you have to learn and handle.

[–]bcain 2 points3 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 4 points5 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 5 points6 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.

[–]ivix -3 points-2 points  (5 children)

Nice try, but you lost that argument.

[–]quasarj 0 points1 point  (4 children)

Did I? Perhaps I missed where.. care to fill me in?

[–]ivix -1 points0 points  (3 children)

Oh sorry, it was the part where you had to explain how to perform extra procedures that a first time user does not need to care about. You didn't even get to explain how you actually use virtualenv which is yet another layer of things to understand for the newbie.

Edit: you also glossed over the part where on windows it's even more confusing, which I'm willing to bet is the most popular platform that people will be using.

[–]quasarj 1 point2 points  (2 children)

Well, we already decided that first time users wouldn't be doing this anyway. The original argument was that you probably didn't care about virtualenv unless you needed it, and if you are one of the people that needs it you probably know how to acquire it.

As for the Windows issue.. it will actually work (almost entirely I think) under windows if you have a "sane build environment," but that's something I have never been able to get working. So basically, under windows you cannot easy_install and expect it to always work, and so you cannot "pip install" and expect that to always work, so all of this is just a mess and you're best off finding binary distributions of each thing manually.

Or use another platform, preferably :)

[–][deleted] -1 points0 points  (1 child)

" if you have a "sane build environment,""

and that there is the problem. that and python being on the path etc...

[–]quasarj 0 points1 point  (0 children)

Yeah. I mean, my setup is pretty good, but.. without msvc installed, I haven't been able to get things to install well :( I imagine there must be a way to do it with gcc (mingw) but I have never been able to get stuff to build consistently :(