-
Notifications
You must be signed in to change notification settings - Fork 3.1k
draft of new install instructions based on discussion in #1079 #1103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
btw, I've pushed similar instructions up to the user guide. I will change according to feedback here. https://python-packaging-user-guide.readthedocs.org/en/latest/setup.html I would have logged it as PR for discussion, but:
|
even though and will add a footnote about secure downloading for anywhere "download" is used |
Looks like a good interim solution to me, as well as a better guide for what we should offer in Python 3.4 (i.e. add pip support to pyvenv, rather than focusing on in-place bootstrapping) |
I just looked at what's available in the user guide, and one major thing concerns me. The recommendation to simply use an unpacked virtualenv instead of installing it somewhere (even if somewhere is the user packages) does not match what people do in real life. Further more I think it's unlikely that the vast bulk of people will do that in real life and I think that anyone who learns this method will eventually begin installing it somewhere for the convenience factor of having the command available instead of needing to call If things are broken that prevent being able to recommend installing it (either globally or via @ncoghlan This probably isn't the appropiate venue for this discussion but I do believe that we need pip at the system level as well if we're going to include it with Python. pyvenv (and virtualenv) are not universally accepted and if we focus solely on pyvenv we don't solve the problem for people who want to use it outside of a virtual environment and leave the issue half solved. |
I don't know, I think using an unpacked virtualenv (or before it became unsupported, the older standalone pattern) is fairly common.
Paul mentioned adding the unpacked vitualenv dir to your PATH, so the instructions could explain that (and then you'd just need to call
as for global installs, nothing is broken. the concern is the need for root/system tampering (largely voiced by Nick) as for user installs, yes, stuff is probably broke right now, but realize that recommending a --user install procedure will certainly "not match what people do", and much stress will be had by all getting through a transition like that. I just want something now (not after 1.5 is released in Dec) that won't be viewed as "circular" or considered "irresponsible". I think I'll have to do a breakdown of the options and post to pypa-dev tomorrow. |
On 5 August 2013 16:09, Donald Stufft [email protected] wrote:
Remember, the standard library solution is for beginners, and beginners |
"System" level is actually a misnomer because Python isn't distributed at the system level by Python. Couching it in terms of a Linux distribution is pushing the concerns of a Linux distribution onto a cross platform language. I'm sure Linux packagers will rip pip out regardless of what we do and make it a separate package so for people installing it via their Linux package manager the proposal to include pip will likely have very little to no effect. So not only is it attempting to impose the constraints of one type of install on one platform on the broader language, it's type of install/platform that likely will ignore the PEP and undo it. You say this is for beginners, however by advocating either |
@qwcode Do you have any data to back that up? I don't think i've ever seen anyone do that. Granted I don't follow virtualenv development or issues very much but I'd think if it was popular I'd have seen someone do it before? |
@dstufft mostly based on users being familiar with the old standalone pattern. virtualenv's install instructions used to be like 2 lines, with the 2nd line being "you can just grab the single file virtualenv.py and run it with python virtualenv.py." |
Window doesn't have a dependency system, but it does have a system More generally, I refuse to have CPython endorse supposedly The assumption to run with for the moment is that Python 3.4 will likely |
Firstly I'm not sure why bundling pip with Python itself vs only inside of a pyvenv somehow translates to endorsing installing into the system location. Especially after I've already talked to you about wanting to make sure that a globally installed pip plays nicely with the various systems and that installing globally is opt-in rather than opt-out. This might take the form of some sort of Secondly you state that it's a bad idea on every platform except windows which is untrue. It's generally only a bad idea on the system installed Python from *nix, and then only because a different tool expects to "own" that area of install which clashes with pip. Off the top of my head here are places where it's perfectly fine, and even preferable to install globally with pip:
Of those 6 off the top of my head 3 of them are installation methods that are most certainly used by beginners and a fourth and possibly fifth is one that is very likely used by beginners. Basically it's a perfectly fine, if not the preferred or only option for installation any time you have a version of Python not controlled by a system level package management tool. I think you are letting your close proximity to Linux system packages influence your viewpoint and the fact that in that one specific scenario it can be a bad idea to install globally using pip prevent you from seeing the larger picture. Quite frankly I find the bit about Windows bordering on FUD. You state that it avoids needing elevated privileges but I don't think that is a thing that even matters in this context. If it's installed to Program Files, yes it would need elevated privs but all that means is it's on the same footing as the *nix's in which it would still not having any bearing on whether or not it's a good idea to install something into site-packages. As to the not registering with MSI, installing a Python package via pip is explicitly outside of the realm of MSI, just the same as any other software you'd install on Windows that then installed other software. It is true that those files would be left behind during an uninstall it doesn't prevent or cause any sort of trouble when uninstalling Python (and Python itself leaves files behind). Can you point out any other instances where using pip to install to site-packages is a bad idea? Because literally the only one I can come up with is *nix, and not just *nix, but specifically *nix where the Python in question is installed and "owned" by the system package manager. Thirdly, bootstrapping of any kind that fetches and installs from the internet on end user machines is likely to be a bad idea. Not only do you place a requirement for networking (of which there may be none) and a fully functioning SSL stack (which is hardly guaranteed as we learned in pip) in order to install the packages (which are not required to be fetched over the internet), but you also by requirement need to implement your own little mini pip in order to do so properly. Thinking that CPython is both going to get it right immediately, and is going to continue to get it right as things evolve with a version that will not have anywhere near the amount of testing and real world use as pip itself is hubris. Pip recognized that building a mini pip is a bad idea and the |
Bundle pip with CPython. Install CPython. Upgrade pip. Upgrade CPython to a The only things I genuinely don't like at this point are:
If pip can get to the point of having a zip based self-installer that can Are you sure you don't want to write the bundling/explicit bootstrapping |
I'll note, though, that the contents of a "pip-bootstrap.pyz" and a |
Perhaps that's the part that I haven't been clear on? That I'm |
I just talked to Paul to ask him if he's had a chance to work on it or if he wanted me to take a shot and I believe I'm going to write it up this week hopefully. Does Python support installing a maintenance release over top of an installed release? Either way as far as I know Python doesn't do anything with the site-packages directory (at least on Windows, I use Homebrew for OSX which does things differently and apt on Ubuntu). So if installing a maintenance overtop of an existing one is a supported thing, then as long as whatever lays pip down inside of site-packages checks for the existence of it already installed pip and just NOPs it that should work fine off the top of my head. FWIW I'm all for recommending (and even guiding) users towards --user and virtualenv/pyvenv. I just don't want the PEP to be less useful than it could be to the widest group of people because we got prescriptive instead of descriptive. In the midst of writing this I got your message about I think the ideal method is This will:
It does still leave part of the question on the table of upgrading Python and what should happen, should it issue another One of the things I'm really pushing for is that if you install Python then |
That sounds really good - I'll let Brett know he's off the hook after all |
distutils-sig discussions are like a gas that will fill in any space or medium it can find. |
closing this per discussion on pypa-dev: https://groups.google.com/forum/#!topic/pypa-dev/A7XwxElwFI8 |
in built form: http://qwcode.com/pip_docs/installing.html