Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Solution Error import findspark #2

Open
renatologer opened this issue Dec 24, 2019 · 1 comment
Open

The Solution Error import findspark #2

renatologer opened this issue Dec 24, 2019 · 1 comment

Comments

@renatologer
Copy link

renatologer commented Dec 24, 2019

A My Solution :IndexError Traceback (most recent call last)
in ()
1
2 import findspark
----> 3 findspark.init('/path/to/spark/home')

/usr/local/lib/python3.6/dist-packages/findspark.py in init(spark_home, python_path, edit_rc, edit_profile)
133 # add pyspark to sys.path
134 spark_python = os.path.join(spark_home, 'python')
--> 135 py4j = glob(os.path.join(spark_python, 'lib', 'py4j-*.zip'))[0]
136 sys.path[:0] = [spark_python, py4j]
137
The Solution is:
IndexError: list index out of range
os.environ["JAVA_HOME"] = "/usr/lib/jvm/java-8-openjdk-amd64"
os.environ["SPARK_HOME"] = "/content/spark-2.4.4-bin-hadoop2.7"

@haseebkhan1421
Copy link

I am running the code on google colab you mentioned but its giving me the following error:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants