pip vs python -m pip?

Malcolm Greene python at bdurham.com
Fri Jun 21 10:33:35 EDT 2019


> From: Chris Angelico <rosuav at gmail.com>
> Are you doing this in cmd.exe, powershell, bash, or some other shell?

Same result via cmd.exe and PowerShell (ps1).

> There are a LOT of ways that the Windows path can fail to pick up the correct 'pip'. Normally activating a venv should let you use "pip" to mean the right thing just as "python" does, but maybe something's cached?

I think you're on to something. Running pip as a package (python -m pip) will force the use of the virtual env copy of pip. Running pip as an application vs package may use the system version of pip.

Malcolm



More information about the Python-list mailing list