-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
latest version of pvfactors cannot be installed with pvlib 0.10.0 #1796
Comments
I tried both but still getting errors , also i am unable to figure out how to replace the pvfactor code with solarfactors. Can you update this code which is given as example by pvlib, with exactly what lines to be changed ? File ~\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec File c:\users\saikatghosh\clipping.py:256 File ~\anaconda3\lib\site-packages\pvlib\bifacial\pvfactors.py:97 in pvfactors_timeseries File ~\anaconda3\lib\site-packages\pvfactors\run.py:5 File ~\anaconda3\lib\site-packages\pvfactors\geometry_init_.py:3 File ~\anaconda3\lib\site-packages\pvfactors\geometry\pvarray.py:6 File ~\anaconda3\lib\site-packages\pvfactors\geometry\base.py:12 ImportError: cannot import name 'geos_geometrycollection_from_py' from 'shapely.geometry.collection' (C:\Users\SaikatGhosh\anaconda3\lib\site-packages\shapely\geometry\collection.py) |
The last several versions of pvfactors require
pvlib<0.10
to preempt possible breaking changes. In fact this turned out to be unnecessary; to the best of my knowledge, there is no actual incompatibility between pvfactors==1.5.2 (the latest) and pvlib==0.10.0.However, that upper limit does prevent pip from installing
pvfactors==1.5.2
andpvlib==0.10.0
simultaneously. What it does instead is go back topvfactors==1.4.1
, the last version that doesn't requirepvlib<0.10
. The problem is that this version of pvfactors is old enough to not contain a compatibility fix with the latest shapely, resulting in a broken installation that errors when you try to actually use pvfactors. See for example this failed docs build: https://readthedocs.org/projects/pvlib-python/builds/21171307/Users have two options to work around this problem in the immediate term. Option 1: downgrade shapely to a version that works with
pvfactors==1.4.1
:Option 2: tell pip to ignore pvfactors when it says it isn't compatible with pvlib 0.10.0. This will allow you to keep using pvfactors 1.5.2:
For a more permanent fix, the best solution would be for pvfactors to release a new version that doesn't have this unnecessary
pvlib<0.10
requirement. But since that project is no longer maintained, we can't expect that to happen.In the absence of that, I see two options, both of which require going to 0.10.1:
shapely<2.0
to ouroptional
requirements, effectively making Option 1 above automatic. This has the downside of using an older version of pvfactors, which is missing a minor bugfix that a small minority of users might care about.An aside: although I did make a local
v0.10.0
tag and ensure that the tests passed before making the official 0.10.0 release, I neglected to installpvlib[optional]
in the fresh test environment, so the pvfactors tests were skipped and this problem did not arise. Had I been more thorough, this problem could have been found out before pvlib 0.10.0 was actually released.The text was updated successfully, but these errors were encountered: