PYTHONENVIRONMENTDIR can be set for the wrong version
peardox opened this issue · 2 comments
The IDE plugin sets PYTHONENVIRONMENTDIR but it appears to do so without checking which version of Delphi the user has
This is a problem ONLY if the user has multiple Delphi's installed (I've got four) - actually might be an issue if you downgrade (e.g. remove trial) I guess as well
The HKCU\Software\Embarcadero\BDS registry key can have more than one sub-key (one for each Delphi). The "Environment Variables" of the BDS version that is being used needs the PYTHONENVIRONMENTDIR setting.
I noticed this when I just re-installed P4D-everything in 10.4.2 and 11.2.0 started complaining it couldn't find the zip python payloads
This can be simply resolved by paying attention to the $(ProductVersion) Environment variable when chosing which BDS reg key to alter
Have you tried it at least? We get this info directly from the current Delphi IDE, as follows:
reg add "HKEY_CURRENT_USER\Software\Embarcadero\BDS\%PRODVER%\Environment Variables" /v PYTHONENVIRONMENTDIR /d %PYENVPATH% /f
I noticed it owing to the value being wrong - it's not fresh in my memory after 14 days so I'd have to reconstruct the problem (takes a while)