Reputation: 29
I am trying to get pyspark to run in terminal on Mac OS X; when I run it without sudo, I get the following message:
However, if i type 'sudo pyspark' this happens
.
Is there a way I can type 'pyspark' into terminal without it asking me for my password i.e. having to write sudo first? Thanks
Upvotes: 2
Views: 1204
Reputation: 61
I also encountered this problem.The machine is mac and I install pyspark by brew. In my situation, the problem is caused by the ~/.bash_profile. The problematic spark export statement is as follows:
export SPARK_HOME=/usr/local/Cellar/apache-spark/2.4.0
export PATH=$PATH:$SPARK_HOME
In this situation, pyspark only runs using sudo.
After I modify spark export statement as follows,
export SPARK_HOME=/usr/local/Cellar/apache-spark/2.4.0/libexec
export PATH=$PATH:$SPARK_HOME
I can run pyspark by command 'pyspark'.
Upvotes: 5