Spark Exception when running init()

Hi, I’m a new Hail user and installed on my Mac using the pip command. I am following the tutorials, and the code is failing in the hl.init() command. Am I missing a step during setup?

HI @Trisha_Karani ,
Can you copy and paste the error message. The screenshot truncated the output so I can’t make out what the issue is.
Thanks!

I’m getting an error from zulip saying as a new user I can only post two links per post. I’ll try to do it in chunks.

Hi @Trisha_Karani,

Thanks for sharing all those screenshots. Odd it didn’t let you paste a stacktrace. Anyway…

Not too sure what’s going on here. Couple of things to check:

  1. How did you install hail? Did you pip install using a conda environment (or other virtual environment) or using your system’s python installation? We generally recommend using a conda environment so that’s something to try if you aren’t already:

test_multi_way_zip_join_highly_unbalanced_partitions__issue_14245

  1. Java - Errors - Apple Mac M1 · Issue #13758 · JohnSnowLabs/spark-nlp · GitHub looks suspiciously similar to your issue. In the resolution, there’s talk about having a compatible Java installation. Can you follow the thread therein and check your java installation is compatible?

  2. I’ve sometimes struggled with spark on a mac. I’ve found that starting the python process with the environment variable SPARK_LOCAL_IP defined can help with connection errors. For example, if you’re starting ipython from a terminal and you plan to use spark in local mode (ie not connecting to a remote spark cluster):

SPARK_LOCAL_IP='127.0.0.1' ipython

Let me know how you get on. I hope this helps!