On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:
To be sure, you can always go the the directory of the Python interpreter and open a cmd window there.
(By entering 'cmd' into the explorer address bar.)
Then enter 'python.exe -mpip install paramiko'.
This way you can be sure that you're not running a pip.exe that belongs to another Python interpreter.

This is not quite right. The best name of the Python executable may or may not be "python.exe". The command line needs a space after the "-m":

<python executable> -m pip install <package>

For <python executable>, you can check if "python" runs the intended version by using the -V option (must be capitalized):

python -V

On Windows, Python from python.org usually installs a launcher named "py", which will run the last version installed:

py -m pip install ...

Or it can run a specific version, e.g.:

py -3.7 -m pip install ...

This will run Python 3.7 if installed.

On Linux, you can run the desired version with, e.g.,

python3.7 -m pip ...
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to