Skip to content
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

scipy.stats is broken in superbuild install #60

Open
taobrienlbl opened this issue Jul 27, 2021 · 0 comments
Open

scipy.stats is broken in superbuild install #60

taobrienlbl opened this issue Jul 27, 2021 · 0 comments
Labels

Comments

@taobrienlbl
Copy link
Collaborator

Importing scipy.stats does not work in TECA_superbuild. It appears that pytorch installs the dataclasses module, but it's no longer necessary as of python 3.7. Running pip3 uninstall dataclasses fixes the issue. We might want to add this at the end of the superbuild.

Note that I ran the pip uninstall command above on the NERSC install of superbuild (/global/common/software/m1517/teca/master-814afb06/), so I think this won't be reproducible at NERSC (sorry about that @burlen).

To reproduce:

python3 -c 'import scipy.stats'

raceback (most recent call last):
  File "/global/project/projectdirs/m1517/cascade/taobrien/c20c_ars/ar_precip_check/./teca_get_correlations.py", line 8, in <module>
    import scipy.stats
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/scipy/stats/__init__.py", line 441, in <module>
    from .stats import *
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/scipy/stats/stats.py", line 37, in <module>
    from scipy.spatial.distance import cdist
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/scipy/spatial/__init__.py", line 102, in <module>
    from ._geometric_slerp import geometric_slerp
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/scipy/spatial/_geometric_slerp.py", line 8, in <module>
    from scipy.spatial.distance import euclidean
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/scipy/spatial/distance.py", line 1650, in <module>
    class CDistMetricWrapper:
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/dataclasses.py", line 950, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/dataclasses.py", line 800, in _process_class
    cls_fields = [_get_field(cls, name, type)
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/dataclasses.py", line 800, in <listcomp>
    cls_fields = [_get_field(cls, name, type)
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/dataclasses.py", line 659, in _get_field
    if (_is_classvar(a_type, typing)
  File "/global/common/software/m1517/teca/develop-8e6c7571/lib/python3.8/site-packages/dataclasses.py", line 550, in _is_classvar
    return type(a_type) is typing._ClassVar
AttributeError: module 'typing' has no attribute '_ClassVar'

See ray-project/tune-sklearn#181 and huggingface/transformers#8638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant