projectglow / glow

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

Problem importing Glow #535

Closed LuisGGon closed 5 months ago

LuisGGon commented 9 months ago

I just have installed glow.py through poetry but when I run import glow I got the following error message:

  File "<stdin>", line 1, in <module>
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/glow/__init__.py", line 30, in <module>
    from .wgr import *  # For backwards compatibility. Avoid showing this import in docs.
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/glow/wgr/__init__.py", line 15, in <module>
    from glow.wgr.ridge_reduction import *
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/glow/wgr/ridge_reduction.py", line 15, in <module>
    from .ridge_udfs import *
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/glow/wgr/ridge_udfs.py", line 15, in <module>
    from glow.wgr.model_functions import *
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/glow/wgr/model_functions.py", line 25, in <module>
    from nptyping import Float, Int, NDArray
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/nptyping/__init__.py", line 2, in <module>
    from nptyping.functions._get_type import get_type
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/nptyping/functions/_get_type.py", line 23, in <module>
    from nptyping.types._unicode import Unicode
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/nptyping/types/_unicode.py", line 30, in <module>
    class Unicode(NPType, numpy.unicode, metaclass=_UnicodeMeta):
  File "/mnt/0A2AAC152AABFBB7/side_projects/Genomics/.venv/lib/python3.10/site-packages/numpy/__init__.py", line 328, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'unicode'. Did you mean: 'unicode_'?
LuisGGon commented 9 months ago

Probably the reason behind the problem is that nptyping 1.3.0 is a little bit old for numpy requirements.

williambrandler commented 7 months ago

glow depends on spark, did you also start the spark shell with the glow maven package?

https://glow.readthedocs.io/en/latest/getting-started.html#running-locally

henrydavidge commented 5 months ago

Hi @LuisGGon we'll have a new release soon that works with newer nptyping versions. If you would like to test before then, you can build the Scala and Python artifacts from source.