PEP-514 support was removed in version 2.0 but is still documented
PR #135 removed WindowsFinder (which wrapped the vendored pep514tools library) and did not replace it with any equivalent support for PEP-514.
As noted in the PR description, this was somewhat intended, as it removed Windows-specific support (leaving only PATH-env searching), and PEP-514 is a Windows-specific mechanism.
However, the documentation was not updated for this change, and still claims PEP-514 compatibility, including a pep514 tag on PyPI.
Testing results on a Windows system with Python 3.9 and 3.10 installed but not in the PATH (inside a venv, I believe):
> pip install --quiet --upgrade "pythonfinder[cli]<2" && pyfinder --findall
Found python at the following locations:
3.10: 3.10.11 (64bit) @ C:\Program Files\Python310\python.exe
3.9: 3.9.10 (64bit) @ C:\Program Files\Python39\python.exe
> pip install --quiet --upgrade "pythonfinder[cli]" && pyfinder --findall
ERROR: No valid python versions found! Check your path and try again.
Please provide a command
The system's PyLauncher details:
> py --list
Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows
(venv) *
-3.10-64
-3.9-64
See also https://github.com/sarugaku/pythonfinder/pull/135#issuecomment-1978763395 and https://github.com/python-poetry/poetry/issues/2117#issuecomment-1977151338
This is something I am supportive of improving/fixing in terms of restoring the functionality. Is there a way to do so without vendoring in pep514tools? IIRC that library hasn't been updated in some time and there were other windows specific bugs we were trying to address by having the code paths be in-house and more similar across OS.
You'd have to implement the same registry searching logic documented in PEP-514. I had a quick look last month, and my recollection is that this is basically all pep514tools is doing, and it probably hasn't been updated because there's nothing that needs to change: The algorithm was finalised in 2016.
Although looking closer, I see some issues are open and unaddressed, including yours, so a local PEP-514 consumer implementation should be pretty simple. (pep514tools also supports manipulating the PEP 514 data, and we don't need that here)
I haven't forgotten about this, here is my draft attempt: https://github.com/pypa/pipenv/pull/6140
I made it against pipenv to run with the full test suite there and plan to backport the changes to a PR here.