PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

Bogus Environment Names in UI

Open traits opened this issue 1 year ago • 2 comments

I'm using WinPython and have two Python versions 'installed'. One of them can be registered at the same time and when I do this, a strange new bogus environment appears in Visual Studios "Python Environments" UI (cf. screenshots). The references in these environments are correct, but the name "3.1" is wrong. These envs or their UI representation are quite sticky and cannot be removed easily. Additionally, the "3.1" seems to trigger real warnings regarding an outdated Python version. So, it also seems to be interpreted content-wise.

I think, I saw this error in earlier VS versions and it had nothing to do with WinPython, but with the directory naming of the Python installations. From registry:

[HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.10\InstallPath]
@="V:\\bin\\scripting\\python\\3.10.5\\python-3.10.5.amd64"

resp.

[HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.12\InstallPath]
@="V:\\bin\\scripting\\python\\3.12.2\\python-3.12.2.amd64"

Something inside PTVS seems to stumble over the parts containing dots, probably the first one in the respective entry (it can be fixed if this first 3.1x.x part of the corresponding directories is renamed to something else). This might be related to #7812

VS Version: 17.9.2 PTVS version: 17.0.24002.3

The drive V is a permanent subst to some directory G:\programming, in case this matters.

_real_env _bogus310 _bogus312

traits avatar Mar 02 '24 18:03 traits

It seems to be a bug in winpython after all. So, this can be closed

traits avatar Mar 03 '24 19:03 traits

I will reopen this. Something is still wrong with Python Version Handling. In the PTVS UI an outdated Python Version is assumed also for a default installation made from the standard installer from python.org (see attachements). Interestingly this is not happening for a 3.11.8 installer. I didn't pinpoint the exact version, but 3.12.1 is triggering the error in any case as well as it my WinPython 3.12.2 (again, not the 3.10.5) does. Updating pip to v24.0 doesn't change anything.

Clipboard01 Clipboard02

traits avatar Mar 04 '24 12:03 traits

Closing as a duplicate of https://github.com/microsoft/PTVS/issues/7923, the same issue also seems to repro for conda environment.

StellaHuang95 avatar Aug 13 '24 23:08 StellaHuang95