Error executing Jupyter command 'WordCount.py': [Errno 2] No such file or directory

因为课程要求,最近疯狂搭建hadoop集群和spark环境,遇到一些问题,特此记录。

问题描述:
搭建了pycharm+pyspark环境之后,想测试下上传测试文件到HDFS目录,输入命令HADOOP_CONF_DIR=/root/app/hadoop/etc/hadoop spark-submit --driver-memory 512m --executor-cores 2 --master yarn --deploy-mode client WordCount.py
后报错,报错信息如下:

[root@hadoop1 ipynotebook]# HADOOP_CONF_DIR=/root/app/hadoop/etc/hadoop spark-submit --driver-memory 512m --executor-cores 2 --master yarn --deploy-mode client WordCount.py
Error executing Jupyter command '/root/pythonwork/ipynotebook/WordCount.py': [Errno 2] No such file or directory
20/04/21 11:43:53 INFO util.ShutdownHookManager: Shutdown hook called
20/04/21 11:43:53 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-0c79937f-ce97-4204-8de2-6adac3d21104

问题分析:
因为在此之前我测试了jupyter所以把环境变量改成了jupyter
Error executing Jupyter command 'WordCount.py': [Errno 2] No such file or directory_第1张图片

解决方法:
重新编辑环境变量
Error executing Jupyter command 'WordCount.py': [Errno 2] No such file or directory_第2张图片

成功在这里插入图片描述

你可能感兴趣的:(Error executing Jupyter command 'WordCount.py': [Errno 2] No such file or directory)