python下的pyspark报错集锦

4 篇文章 0 订阅

1.WARN Utils: Service ‘SparkUI’ could not bind on port 4040. Attempting port 4041.

出现这种错误是是在spark启动从节点时出现的。
解决的方法是,在spark-env.sh中加入一条
SPARK_LOCAL_IP=127.0.0.1
然后就完美解决报错了!
D:\spark\spark-2.2.0-bin-hadoop2.7\bin找到load-spark-env.sh,之后notepad打开,增加如下,完成
这里写图片描述

2.WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/D:/spark/spark-2.2.0-bin-hadoop2.7/jars/hadoop-auth-2.7.3.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
18/05/11 17:07:07 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable

出现以上错误,由于JDK版本为9,太高了,但是不影响运行。可以无事

###3.ython in worker has different version 3.6 than that in driver 3.5, PySpark cannot run with different minor versions.Please check environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON are correctly set.

问题解决:

import os
os.environ["PYSPARK_PYTHON"]="D:\office3\python\\anaconda3.5\\3.5\envs\python35\\python"

指定运行的python环境位置。

微信号
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT界的小小小学生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值