Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--fetch-missing-python not working #1521

Open
draustin opened this issue Aug 27, 2024 · 1 comment
Open

--fetch-missing-python not working #1521

draustin opened this issue Aug 27, 2024 · 1 comment
Labels
bug Something isn't working windows

Comments

@draustin
Copy link

The --fetch-missing-python option appears to have no effect.

Following the example:

pipx install --fetch-missing-python --python 3.12 pycowsay

I see

⚠️ No executable for the provided Python version '3.12' found in py launcher. Please make sure the provided version is listed when running py --list.

It is true that I do not have Python 3.12 installed. The suggested py --list gives

py --list
 -V:3.11 *        Python 3.11 (64-bit)
 -V:3.10          Python 3.10 (64-bit)

But the documentation says that --fetch-missing-python instructs Pipx "to fetch a standalone python build from GitHub if the specified python version is not found locally on the system."

I expected Pipx to automatically download Python 3.12 and create the virtual environment with it.

Verbose output of pipx install --fetch-missing-python --python 3.12 pycowsay --verbose:

pipx >(setup:1110): pipx version is 1.7.1
pipx >(setup:1111): Default python interpreter is 'C:\Program Files\Python310\python.exe'
⚠️ No executable for the provided Python version '3.12' found in py launcher. Please make sure the provided version is listed when running `py --list`.

My system is Windows 11 64-bit.

@dukecat0 dukecat0 added bug Something isn't working windows labels Aug 28, 2024
@pitrou
Copy link

pitrou commented Aug 28, 2024

I'm getting a similar error when trying to use it on Apache Arrow's CI. Weirdly, it seems that the problem may be dependent on the exact Python version that pipx runs on (rather than the Python version that's being asked for).

Here is a successful build where --fetch-missing-python downloads the required Python:
https://github.com/ursacomputing/crossbow/actions/runs/10594249501/job/29357456558#step:9:534

C:\>pipx install --python 3.11 --fetch-missing-python --verbose         "https://github.com/googleapis/storage-testbench/archive/"v0.40.0".tar.gz"           || exit /B 1 
pipx >(setup:1110): pipx version is 1.7.1
pipx >(setup:1111): Default python interpreter is 'C:\Python39\python.exe'
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\venvs
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\.local\share\man
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\.cache
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\py
Downloading python 3.11.9 build...
Unpacking python 3.11.9 build...
[etc.]

Here is a failing build where the same pipx version fails downloading the same Python version (but pipx's own Python version is different):
https://github.com/ursacomputing/crossbow/actions/runs/10594249595/job/29357456749#step:9:552

C:\>pipx install --python 3.11 --fetch-missing-python --verbose         "https://github.com/googleapis/storage-testbench/archive/"v0.40.0".tar.gz"           || exit /B 1 
pipx >(setup:1110): pipx version is 1.7.1
pipx >(setup:1111): Default python interpreter is 'C:\Python310\python.exe'
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\venvs
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\.local\share\man
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\.cache
pipx >(mkdir:76): creating directory C:\Users\ContainerAdministrator\pipx\py
No executable for the provided Python version '3.11' found in py launcher.
    Please make sure the provided version is listed when running `py --list`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

3 participants