On Mac:
-
Install Python:
pyenv install 2.7.13
-
Use Python 2.7.13:
pyenv local 2.7.13
-
Install pyenv-virtualenv:
brew install pyenv-virtualenv
-
Add these to your
~/.profile
:eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"
-
Restart your shell
-
Setup virtualenv:
pyenv virtualenv 2.7.13 my-virtual-env-2.7.13
-
Activate the virtualenv:
pyenv activate my-virtual-env-2.7.13
-
Install the deps:
pip install -r requirements.txt
-
Extract Spark:
tar -zxvf spark-2.1.0-bin-hadoop2.7.tgz
-
Run
test-pyspark.py
:~/YOUR_SPARK_HOME/bin/spark-submit test-pyspark.py