Skip to main content
Sadique1
Gold ⭐️
Oct 5, 2021 9:21 AM UTC
Solved

unable to load spark shell

spark-shell
File "/bin/hdp-select", line 256
print "ERROR: Invalid package - " + name
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("ERROR: Invalid package - " + name)?
ls: cannot access /usr/hdp//hadoop/lib: No such file or directory
Exception in thread "main" java.lang.IllegalStateException: hdp.version is not set while running Spark under HDP, please set through HDP_VERSION in spark-env.sh or add a java-opts file in conf with -Dhdp.version=xxx
at org.apache.spark.launcher.Main.main(Main.java:118)
Sadique1
Sadique1Answer
Gold ⭐️
Oct 11, 2021 8:50 AM UTC

Set spark home and Python version 2.7 in bash.rc

 

 

3 replies

Shifu
Gold ⭐️⭐️
Gold ⭐️⭐️
Oct 5, 2021 1:07 PM UTC

hi @Sadique1 

 

Can you run which spark-shell and share us the results

Translate
Sadique1
Sadique1Author
Gold ⭐️
Oct 6, 2021 6:40 AM UTC

[root@datascience38 ~]# which spark-shell

/opt/anaconda2/bin/spark-shell

Translate
Sadique1
Sadique1AuthorAnswer
Gold ⭐️
Oct 11, 2021 8:50 AM UTC

Set spark home and Python version 2.7 in bash.rc

 

 

Translate