10 ms·
why is it that the pip command can't handle what it's supposed to do, instead you have to resort to `python3 -m pip install`? Hell, it even breaks itself: pip
by singularity2001 8y ago
why is it that the pip command can't handle what it's supposed to do, instead you have to resort to `python3 -m pip install`?
Hell, it even breaks itself:
pip install --upgrade pip # => pip unusable
https://github.com/pypa/pip/issues/5447 https://github.com/pypa/pip/issues/5447
https://github.com/pypa/pip/issues/5221 https://github.com/pypa/pip/issues/5221
etc
- mehrdadn 8y agoWell pip is only one command, so it can't simultaneously work for both Python 2 and Python 3. And if you happen to have another installation of Python or pip in your path (e.g. at the user-level) but not have the other one there, then they'd affect different installations entirely. When you run it via Python you know it's affecting exactly the same installation. Upgrading pip itself is kind of a special case I think. You don't want to upgrade stuff managed by a system package manager using pip; their work will conflict with each other. This includes pip itself. I think this is kind of a mess and I don't know of a great way to deal with it other than just remembering not to upgrading system packages using pip (yes this includes pip itself, and means you should avoid trying to upgrade via --user if it's installed on the system). On Windows where I am it's ironically less annoying since there's no system-level package manager to worry about... go figure.
- prepend 8y agoHow would pip know if you want python3 or 2? On Mac, the system uses python2 so pip and python link to py2. You can change the system -not fun- or wait for apple to upgrade to py3. Ive been waiting a long time. There are tools like conda that do manage py2 and py3 projects living in harmony.
- mixmastamyk 8y agoNope, pip2, pip3. I upgrade all the time no problems, lin and win however.