Mailing List Archive

Using PIP in Python 3.10 on Windows 10
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.


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. 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?

--
Jonathan Gossage
--
https://mail.python.org/mailman/listinfo/python-list
Re: Using PIP in Python 3.10 on Windows 10 [ In reply to ]
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.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Using PIP in Python 3.10 on Windows 10 [ In reply to ]
On 2022-01-14 17: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.
>
>
> 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. 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?
>
These days it's recommended that you use the Python Launcher and the pip
module:

py -m pip install pip --upgrade
--
https://mail.python.org/mailman/listinfo/python-list
Re: Using PIP in Python 3.10 on Windows 10 [ In reply to ]
On 1/14/22, Mats Wichmann <mats@wichmann.us> wrote:
> On 1/14/22 10:40, Jonathan Gossage wrote:
>
> By this do you mean the python.org installer or the Microsoft Store
> installer - they're similar but have some differences.

Jonathan is not using the store app. The store app is installed to the
system in "%ProgramFiles%\WindowsApps" and "%ProgramData%\Packages",
and in each user's "%LocalAppData%\Packages". The user's enabled app
aliases are created in "%LocalAppData%\Microsoft\WindowsApps".

>> 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).

Jonathan did not install to a standard location. The standard location
for a per-user installation is
"%LocalAppData%\Programs\Python\PythonXY[-32]". If "%LocalAppdata%" is
"D:\Users\jgoss\AppData\local", then the standard location for 64-bit
3.10 would be "D:\Users\jgoss\AppData\local\Programs\Python\Python310".

> 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.

Upgrading pip in Windows always requires running the module with `-m
pip`. By default the py launcher is installed, in which case pip 3.10
can be upgraded with the following command:

py -3.10 -m pip install --upgrade pip

If Python is installed for all users, the above command may require
elevating to get administrator access. Afterwards you can use the
"pip.exe" launcher, but first check `where.exe pip` to make sure the
first one found is the right one. If not, modify your per-user and/or
system PATH to fix it.
--
https://mail.python.org/mailman/listinfo/python-list