hail-is / hail

Cloud-native genomic dataframes and batch computing
https://hail.is
MIT License
982 stars 246 forks source link

Installing from PyPI leads to a broken install #14630

Closed sg-s closed 3 months ago

sg-s commented 3 months ago

What happened?

I installed from PyPI and obtained hail 0.2.132

I made sure I used a completely clean environment with nothing in it (using pixi).

When I did

import hail

I got this error:

>>> import hail
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hail/__init__.py", line 40, in <module>
    from hail.utils import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hail/utils/__init__.py", line 4, in <module>
    from .hadoop_utils import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hail/utils/hadoop_utils.py", line 7, in <module>
    from hail.fs.hadoop_fs import HadoopFS
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hail/fs/hadoop_fs.py", line 8, in <module>
    from hailtop.fs.fs import FS
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/fs/__init__.py", line 1, in <module>
    from .fs_utils import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/fs/fs_utils.py", line 4, in <module>
    from hailtop.aiocloud.aiogoogle import GCSRequesterPaysConfiguration
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiocloud/aiogoogle/__init__.py", line 1, in <module>
    from .client import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiocloud/aiogoogle/client/__init__.py", line 8, in <module>
    from .storage_client import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiocloud/aiogoogle/client/storage_client.py", line 14, in <module>
    from hailtop.aiotools import FeedableAsyncIterable, WriteBuffer
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiotools/__init__.py", line 1, in <module>
    from .fs import (
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiotools/fs/__init__.py", line 1, in <module>
    from .copier import Copier, CopyReport, SourceCopier, SourceReport, Transfer, TransferReport
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/hailtop/aiotools/fs/copier.py", line 7, in <module>
    import humanize
  File "/Users/srinivas/test/.pixi/envs/default/lib/python3.12/site-packages/humanize/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

I think this is largely because hail requires an ancient version of humanize (v1 vs v4)

In any case, the wheel on PyPI is broken and un-importable.

There are other issues stemming from the underlying issue that there is no clear description of requirements and dependencies.

Version

0.2.132

Relevant log output

No response

sg-s commented 3 months ago

resolution:

this is because setuptools is required, but is not listed as a dep.

if you add setuptools, i can at least import hail

ehigham commented 3 months ago

Thanks for reporting this. I had tried to remove our dependence on setuptools but had not done a good enough job clearly.