findspark.init() IndexError: list index out of range error

前端 未结 4 991
醉酒成梦
醉酒成梦 2020-12-17 10:11

When running the following in a Python 3.5 Jupyter environment I get the error below. Any ideas on what is causing it?

import findspark
findspark.init()
         


        
4条回答
  •  眼角桃花
    2020-12-17 10:34

    This is most likely due to the SPARK_HOME environment variable not being set correctly on your system. Alternatively, you can just specify it when you're initialising findspark, like so:

    import findspark
    findspark.init('/path/to/spark/home')
    

    After that, it should all work!

提交回复
热议问题