How to set up pyspark in conda environment?

Viewed 1220

Here is all the commands I ran (in the same order):

conda create --name python_db python
conda activate python_db
conda install python
conda install pyspark

And then when I run pyspark, I get the following error:

Missing Python executable 'python3', defaulting to 'C:\Users\user\Anaconda3\envs\python_db\Scripts\..' 
for SPARK_HOME environment variable. Please install Python or specify the correct Python executable in 
PYSPARK_DRIVER_PYTHON or PYSPARK_PYTHON environment variable to detect SPARK_HOME safely.

How do I fix the issue?

0 Answers
Related