Using PIP in Python 3.10 on Windows 10
Mats Wichmann
mats at wichmann.us
Fri Jan 14 14:08:25 EST 2022
On 1/14/22 10:40, Jonathan Gossage wrote:
> I have installed Python 3.10.1 on Windows 10 using the recommended Windows
> Installer. When I try to access PIP from the command line, I get the
> following result, even though Python itself is accessible.
By this do you mean the python.org installer or the Microsoft Store
installer - they're similar but have some differences.
>
>
> C:\Users\jgoss>python
> Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> quit()
>
> C:\Users\jgoss>pip install pip --upgrade
> Fatal error in launcher: Unable to create process using '"C:\Program
> Files\Python310\python.exe" "C:\Program Files\Python310\Scripts\pip.exe"
> install pip --upgrade': The system cannot find the file specified.
> During the installation, I chose to install Python in a non-default
> location and to set the Environment variables.
> The result of this attempt is shown below:
>
>
> C:\Users\jgoss>python
> Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> quit()
>
> C:\Users\jgoss>pip install pip --upgrade
> Fatal error in launcher: Unable to create process using '"C:\Program
> Files\Python310\python.exe" "C:\Program Files\Python310\Scripts\pip.exe"
> install pip --upgrade': The system cannot find the file specified.
>
> It looks as if the launcher is expecting to find Python installed at
> c:\Program Files\Python3.10 whereas it has actually been installed at
> D:\Users\jgoss\AppData\local\python\python3.10.
earlier you said "non-standard location" but that's not non-standard at
all, that's actually the standard place for the python.org installer to
put it if you requested a single user install (as opposed to a
system-wide one).
> It seems that the launcher
> has not been updated to the latest installation location for python and
> that it also needs to handle a non-default install location. The same
> problem occurs if I take the install option to install to the default
> location.
> Is there any workaround as PIP is essential to my environment?
>
If you can find Python, whether it's called "python" or "py" in your
case, then you should be able to reach pip with "python -m pip" or "py
-m pip". If you're using the python.org version, you probably want to
use "py" to launch Python.
It looks like you're stumbling over the little stub Microsoft leaves
around which isn't Python, but rather, if you call it, issues a prompt
to install from the Microsoft Store. That might be why the sequnce
being issued doesn't work. That part of the issue might be solvable by
fiddling the order of your PATH environment vars.
More information about the Python-list
mailing list