Skip to content

Conversation

@idanmiara
Copy link
Contributor

Currently PythonVersions.pas - PythonVersionFromPath.FindPythonDLL only supports Python??.dll (Python<3.10).
With this PR it will only search for supported versions of Python (and also support >=v3.10).

Some old distributions of OSGeo4W also distribute Python2 + Python36 in the same folder, although this configuration is not recommended, this fix will also load correctly Python36 in this case.

…earch only for supported versions of Python (and also support >=v3.10)
@pyscripter
Copy link
Owner

pyscripter commented Sep 5, 2021

I have provided a different fix in 7be676d.
It does not handle the case of multiple dlls residing in the same path, but this is extremely rare and wrong.

Could you please test the changes?

@pyscripter pyscripter closed this Sep 5, 2021
@idanmiara
Copy link
Contributor Author

I have provided a different fix in 7be676d.
It does not handle the case of multiple dlls residing in the same path, but this is extremely rare and wrong.

Could you please test the changes?

Thanks for looking into this.

I'm not sure when I'll have time to look into this issue again as I work on other projects currently.

May I ask why did you prefer to use a different fix then the one I've suggested ?

@pyscripter
Copy link
Owner

Slightly faster. Calling FileExist for every version is slower I think than using FindFile once.

On the other hand your version would have the advantage of being cross-platform, so I may get back to it at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants