为了账号安全,请及时绑定邮箱和手机立即绑定

python下的pyspark报错集锦

标签:
Python

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"12

指定运行的python环境位置。


点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消