vim ~/.bashrc
末尾添加
export PYTHONPATH=
S
P
A
R
K
H
O
M
E
/
p
y
t
h
o
n
:
SPARK_HOME/python:
SPARKHOME/python:SPARK_HOME/python/lib/py4j-0.10.7-src.zip:$PYTHONPATH
export PYSPARK_PYTHON=python3
然后生效
source ~/.bashrc
到spark目录下执行
./bin/pyspark
启动PySpark shell成功
pyspark env: ‘python’: No such file or directory
最新推荐文章于 2024-02-19 19:58:13 发布