projectglow / glow

An open-source toolkit for large-scale genomic analysis
https://projectglow.io
Apache License 2.0
262 stars 106 forks source link

import glow throws error: module 'numpy' has no attribute 'unicode'. Did you mean: 'unicode_'? #539

Closed bounaux closed 5 months ago

bounaux commented 7 months ago

I'm running databricks on Azure with Python v3.10.12. First line of import glow immediately throw error, here is trace, any idea pls?

SparkSession available as 'spark'.

import glow Traceback (most recent call last): File "", line 1, in File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/glow/init.py", line 30, in from .wgr import # For backwards compatibility. Avoid showing this import in docs. File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/glow/wgr/init.py", line 15, in from glow.wgr.ridge_reduction import File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/glow/wgr/ridge_reduction.py", line 15, in from .ridge_udfs import File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/glow/wgr/ridge_udfs.py", line 15, in from glow.wgr.model_functions import File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/glow/wgr/model_functions.py", line 25, in from nptyping import Float, Int, NDArray File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/nptyping/init.py", line 2, in from nptyping.functions._get_type import get_type File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/nptyping/functions/_get_type.py", line 23, in from nptyping.types._unicode import Unicode File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/nptyping/types/_unicode.py", line 30, in class Unicode(NPType, numpy.unicode, metaclass=_UnicodeMeta): File "/local_disk0/.ephemeral_nfs/clusterlibraries/python/lib/python3.10/site-packages/numpy/init.py", line 320, in getattr raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'unicode'. Did you mean: 'unicode'?

bounaux commented 7 months ago

Did you mean: 'unicode_'?

henrydavidge commented 5 months ago

I believe that this is occurring because the numpy and npyping versions are not compatible. We'll have a new release soon with a looser nptyping version requirement. Until then, you can build artifacts from source.