{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pip/issues/3164","labels_url":"https://api.github.com/repos/pypa/pip/issues/3164/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pip/issues/3164/comments","events_url":"https://api.github.com/repos/pypa/pip/issues/3164/events","html_url":"https://github.com/pypa/pip/issues/3164","id":109993120,"number":3164,"title":"Deprecate pip, pipX, and pipX.Y","user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=3","gravatar_id":"","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":64,"created_at":"2015-10-06T11:58:31Z","updated_at":"2015-10-08T02:57:24Z","closed_at":null,"body":"Currently, people are regularly running into problems over confusion about which particular Python a particular invocation of pip is going to manage. There are many cases where what Python a particular invocation of ``pip*`` is going to invoke is unclear:\r\n\r\n* ``pip3 install --upgrade pip`` will overwrite ``pip`` and possibly switch it from pointing to 2.7 to 3.5.\r\n* ``pip3`` isn't specific enough, you might have 3.4 and 3.5 installed.\r\n* ``pip3.4`` isn't specific enough, you might have 3.4.0 and 3.4.1 installed.\r\n* ``pip3.4.0`` isn't specific enough, you might have multiple copies of 3.4.0 installed in various locations.\r\n* We don't have a good answer for what the pip binary should be called on alternative Python interpreters like PyPy (``pip-pypy``? What if we have two versions of PyPy? ``pip-pypy2.6``? What if we have PyPy and PyPy3? ``pip-pypy-2.6`` and ``pip-pypy3-2.6``?).\r\n\r\nOverall, it's become increasingly clear to me that this is super confusing to people. Python has a built in mechanism for executing a module via ``python -m``. I think we should switch to using this as our preferred method of invocation. This should completely eliminate the confusion that is caused when ``python`` and ``pip`` don't point to the same version of Python, as well as solve the problem of what do you call the binary on alternative implementations.\r\n\r\nIn addition to the confusion, we also have the fact that ``pip install --upgrade pip`` doesn't actually work on Windows because of problems with the ``.exe`` file being open. However ``python -m pip install --upgrade pip`` does work there.\r\n\r\nI see only three real downsides:\r\n\r\n* There is a lot of documentation, examples, code or other instances of inertia using just ``pip`` and this will be churn for those.\r\n* It's 10 more letters to type.\r\n* It doesn't work on Python 2.6.\r\n\r\nFor the first of these, I think the answer is to just have a very long deprecation cycle, in the order of years. I wouldn't even put a specific date on it's removal, I'd just add the warnings and re-evaluate in the future. Luckily we've shipped support for ``python -m pip`` for quite some time, so it won't be something that people need to deal with version differences (mostly).\r\n\r\nThe second of these I don't really have a great answer for, I think that 10 extra letters probably isn't that big of a cost to pay for the reduced confusion and the default answer working on Windows. We could possibly offer a recipe in the docs to restore ``pip``, ``pipX``, and ``pipX.Y`` via shell aliases.\r\n\r\nThis last item is the biggest sticking point for me. As far as I know, Python 2.6 still has far too many users for us to drop it since, as of 6 months ago, it was still ~10% of the traffic on PyPI ([source](https://caremad.io/2015/04/a-year-of-pypi-downloads/)). The problem with Python 2.6 is that it only supports ``-m`` when the target is a module not a package. I see four possible solutions to this:\r\n\r\n* Don't deprecate ``pip*`` on Python 2.6.\r\n* Add a module like ``pipcli.py`` that people can invoke like ``python -m pipcli`` instead of ``python -m pip``.\r\n* Move ``pip/`` to ``_pip/`` and make ``pip.py``.\r\n* Document that due to limitations of Python 2.6, it will need to be invoked as ``python -m pip.__main__``.\r\n\r\nI don't really like the ``pipcli`` idea, the other three all have pros and cons, but I think I personally live with  either not deprecating ``pip*`` on Python 2.6 and/or documenting that it needs to be invoked as ``python -m pip.__main__ on Python 2.6).\r\n\r\nWhat do the @pypa/pip-developers think?"},"comment":{"url":"https://api.github.com/repos/pypa/pip/issues/comments/146403836","html_url":"https://github.com/pypa/pip/issues/3164#issuecomment-146403836","issue_url":"https://api.github.com/repos/pypa/pip/issues/3164","id":146403836,"user":{"login":"willingc","id":2680980,"avatar_url":"https://avatars.githubusercontent.com/u/2680980?v=3","gravatar_id":"","url":"https://api.github.com/users/willingc","html_url":"https://github.com/willingc","followers_url":"https://api.github.com/users/willingc/followers","following_url":"https://api.github.com/users/willingc/following{/other_user}","gists_url":"https://api.github.com/users/willingc/gists{/gist_id}","starred_url":"https://api.github.com/users/willingc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willingc/subscriptions","organizations_url":"https://api.github.com/users/willingc/orgs","repos_url":"https://api.github.com/users/willingc/repos","events_url":"https://api.github.com/users/willingc/events{/privacy}","received_events_url":"https://api.github.com/users/willingc/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T02:57:24Z","updated_at":"2015-10-08T02:57:24Z","body":"Thanks all for your insights. After reading @cjrh excellent explanation for ubuntu, I'm cool with recovering from fatigue. FWIW, older installs of conda can mess up links and paths to packages as we found at the DjangoCon DjangoGirls. We essentially needed to completely uninstall anaconda and python then reinstall python and pip install the DjangoGirls packages. \r\n\r\nI'm wondering if there is a matrix by Python version that spells out which command for each version and os for pip and virtualenv. A cheatsheet or a small script. My apologies if it is already in the docs."}}