Python added to PATH, cannot be directly accessed, cannot install pip
Eryk Sun
eryksun at gmail.com
Tue Sep 28 02:55:28 EDT 2021
On 9/27/21, Mats Wichmann <mats at wichmann.us> wrote:
>
> pip, meanwhile, is not in the same directory as the python executable,
> so even "adding python to PATH" doesn't solve the problem of running
> pip. Invoke it like this instead:
The installer's option to add Python to PATH adds both the
installation directory and the scripts directory. The latter has
"pip.exe", assuming pip was installed.
> py -m pip install foo
If the `pip` command is on PATH, for an installation or active virtual
environment, it's usually fine to use it instead of `py -m pip` or
`python -m pip`. But there's one caveat. The `pip` command can't be
used to upgrade pip itself. For that you have to run the module via
`'py -m pip` or `python -m pip`.
More information about the Python-list
mailing list