ModuleNotFoundError: No module named 'check'

I’ve tried build the Hail source locally, and followed the instructions given on the Getting Started page. I was able to build the source successfully, but when I tried to import Hail in a Python shell or Jupyter notebook, I get the following error.

.../hail/python/hail/typecheck/", line 1, in <module>
    from check import *
ModuleNotFoundError: No module named 'check'

Is this some error in the Hail modules, or am I missing something? Any help would be appreciated.

I’m using a laptop running OS X 10.12 with Python 2.7, Python 3.6, Anaconda 4.4.0 and Spark 2.0.2 installed.

EDIT: The issue is resolved now. The problem was that the Anaconda distribution I was using came with Python 3.6, and even though I had Python 2.7 installed, it wasn’t the version that was used when I ran it on Jupyter. The types module in Python 3.x differs significantly from that in Python 2.7, which caused the typecheck modules not to work.

Hi! I haven’t seen this error before. Could you make sure that you have the file

{HAIL DIR}/python/hail/typecheck/

Here’s what this looks like for me:

$ ls ~/hail/python/hail/typecheck/

Thanks for the response! I did have the file, but I’ve fixed the issue now.

This issue is caused by using Python 3. Hail only supports Python 2 currently.

Yes there are some exceptions, e,g,
ModuleNotFoundError: No module named 'SocketServer’
ModuleNotFoundError: No module named ‘check’

That might caused by using Python 3 because for example if you change ‘SocketServer’ to the ‘socketserver’ (in Python 3) in the file, the error will be removed.