﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30367	Docs: Change examples using bare `pip ...` to `python -m pip ...`	Ramiro Morales	Ramiro Morales	"Perhaps a minor detail in these times in which Django is Python3-only and usage of some form of virtualenv/minimal container is ubiquitous. But posting for consideration anyways just in case.

Using  `python -m pip install foo`makes sure the copy of `pip` looked up and executed is the one installed for the interpreter copy currently in use (be it a system-wide or a virtualenv's)

This reduces the chances of failure (wrong `pip`gets used and the install fails confusing the user or even worse  the intended install action succeeds but against another copy of Python) in broken setups in which a leftover Python2 `pip` or one associated with a different Python 3.x install is located in a directory which appears earlier in `$PATH`.

Inspired by this article by Brett Cannon: https://snarky.ca/deconstructing-xkcd-com-1987/

Quoting:

> Having `pip` installed is not a shocker. The real question is ''what'' interpreter pip is attached to? That's dependent on which Python interpreter was installed '''last''' in the ''earliest'' directory to have a Python interpreter in it. This is why you should always use `python -m pip` when executing pip to guarantee you are using pip with the interpreter you intend to install for."	Cleanup/optimization	closed	Documentation	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
