Error in Python version check (processing\histogram.py)

23 views
Skip to first unread message

Raj Giridharagopal

unread,
Oct 21, 2018, 3:56:08 PM10/21/18
to pycroscopy
In file:
~\pycroscopy\processing\histogram.py

Line 11+:
if sys.version_info.major == 3 and sys.version_info.minor == 6:
    disable_histogram = True
else:
    disable_histogram = False
    from numpy_groupies import aggregate_np


Why is minor ==6 instead of >= 6? Presumably you're just checking that Python is 3.6 and up, right? Is there something highly specific to 3.6 ONLY that you're checking for? Presumably the aggregate_np function is only there if not inherent to Python in 3.6 and up?
Changed and it worked, if there's a reason to keep it this way I won't make a pull request and instead will debug the numba thing further. Otherwise I get this error:

*Error: RuntimeError: cannot cache function 'AggregateOp.callable.<locals>._loop': no locator available for file 'C:\\Users\\Raj\\Anaconda3\\lib\\site-packages\\numpy_groupies-0.9.7-py3.7.egg\\numpy_groupies\\aggregate_numba.py'
Fresh install did not work, updating all packages post-install did not work. As near as I can tell it's a numba environment issue so it is likely to be my machine specific and not a generalizable thing.

Raj Giridharagopal
Research Scientist
University of Washington

Chris Smith

unread,
Oct 29, 2018, 7:36:58 AM10/29/18
to pycroscopy
Thanks for letting us know about this.  There was a problem using numpy_groupies for some Python versions at one point in time.  I believe that Python 3.6 and newer should work, and have made that change.

Chris Smith
Reply all
Reply to author
Forward
0 new messages