-1

I have installed Spark 2.0 and try the sparkR command. But command occurs error message like below. Others are OK (spark-shell, pyspark,,,). Please help...

[Error message]

Dongkils-MacBook:spark-2.0.0-bin-hadoop2.7 dongkillee$ sparkR env: R: No such file or directory

2 Answers2

1

R: No such file or directory

In windows this error when system not found the R.exe file. Correct with change PATH environment

Yury Arrow
  • 176
  • 7
0

It sounds like maybe SPARK_HOME is not set. Run the Terminal app to get a command prompt and check with: ECHO $SPARK_HOME

If the result does not list the directory where you installed Spark, then there's advice here:
What to set `SPARK_HOME` to?

In R, or R Studio you can set SPARK_HOME from within R like this:

spark_path <- '/path_to_spark/spark_dir'
Sys.setenv("SPARK_HOME" = spark_path)

you also need to add the SparkR library location in R:

spark_lib <- paste(spark_path, "/R/lib", sep="")

Community
  • 1
  • 1
SpiritusPrana
  • 480
  • 3
  • 13