Closed m-richards closed 1 year ago
@m-richards , nice to see you around here!! QGIS does ship with a specific version of Python on Windows, so that is definitely necessary for the average user
@m-richards , nice to see you around here!! QGIS does ship with a specific version of Python on Windows, so that is definitely necessary for the average user
Nice to finally have a small excuse to to play with some of aequilibrae.
Yep, I'm aware that's the usual situation but I don't know if violating that assumption would break the plugin. I see aequilibrae has wheels per platform and python minor release, so as long as the right python is detected, there shouldn't be any issues? I suppose the conda case could be further boxed off by checking for "conda" in sys.version but this seems flakey.
I notice the CI is having some trouble, It looks like one is not looking for a branch on a fork, and the other is looking for secrets which I guess also wouldn't be on a fork.
Hey @m-richards - sorry for delay in reviewing - i just tested out your suggestion to use sys.base_prefix and can confirm it works nicely for a stock windows install. If it also works for conda i think we'd take a punt that it's going to work for OSGEO installations too.
I've been experimenting with using QGIS installed via conda-forge (same idea as this) as a way to keep qgis up to date more easily, and I noticed that the automatic pip install as part of the plugin download is broken when qgis is packaged in this way.
This was the traceback I got
and it seemed pretty straightforward to just add another condition to the windows path lookup.
As an aside, if the default was to use plain python
python
, rather than crash with a FileExistsError (or at least attempt to do so), as it looks like the behaviour was before #213 this would have worked without issue for me (based on testing, that, I wasn't able to install and old commit directly to check).If this is considered out of scope that's fine too, I don't know if the assumption that qgis is bundled with a specific version of python is made, but installing from conda forge would break that - as you can specify qgis and python versions explicitly.
(I also added some things to the gitignore that showed, but that might be a side effect of how I did my dev setup)