-
Notifications
You must be signed in to change notification settings - Fork 1.1k
clearsky.py requires PyTables but setup.py doesn't list it as install_requires #553
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
Comments
Thanks for posting. The base pvlib installation does not require packages such as pytables and scipy that are only used in a handful of functions. See Installation/Compatibility. See #483 for related discussion about making scipy a requirement. |
I think something else is amiss in your code @tadatoshi This runs without error for me: ` dt = pd.DatetimeIndex(start='2018-08-30', end='2018-08-31', freq='1H') df = pd.DataFrame(index=dt) latitude = -23.762 loc = pvlib.location.Location(latitude, longitude, tz = timezone) sun = loc.get_solarposition(df.index) clearsky = loc.get_clearsky(df.index, solar_position = sun) |
@cwhanse I believe you are using the base Anaconda environment which already includes pytables. It sounds like @tadatoshi uses pvlib in an environment that is not prepopulated with pytables, scipy, etc. If I understand correctly, @tadatoshi expects that |
@wholmgren you are correct |
Thank you for prompt responses. I write the context that led me to use pip instead of Anaconda. Maybe this is a special case. |
Getting clearsky from Location causes an error
I tried the rdtools' excample, which used pvlib.
At the first line under section "Clear Sky 0: Preliminary Calculations", executing
clearsky = loc.get_clearsky(df.index, solar_position = sun)
causes an error:
ImportError: The Linke turbidity lookup table requires tables. You can still use clearsky.ineichen if you supply your own turbidities.
Looking at the code found that it requires PyTables package.
Installing PyTables by pip "pip install tables" solved the problem.
To Reproduce
Steps to reproduce the behavior:
loc = pvlib.location.Location(latitude, longitude, tz = timezone)
clearsky = loc.get_clearsky(df.index, solar_position = sun)
Expected behavior
The problem is that PyTables package is required but this is not documented, nor written in setup.py.
This should be documented and PyTables should be lisetd as install_requires in setup.py.
Versions:
pvlib.__version__
: 0.5.2pandas.__version__
: 0.23.4Additional context
This is not necessarily a bug. But other categories didn't seem to fit thus I put this as a Bug report.
The text was updated successfully, but these errors were encountered: