Pyspark:\ Anaconda3 \ envs \ xgboost \ python.exe]在此时是意外的 [英] Pyspark: \Anaconda3\envs\xgboost\python.exe] was unexpected at this time

查看:236
本文介绍了Pyspark:\ Anaconda3 \ envs \ xgboost \ python.exe]在此时是意外的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows中安装Pyspark.

I am trying to install Pyspark in Windows.

我将setx应用于以下内容:

I applied setx to the following:

PYSPARK_DRIVER_PYTHON "C:\Users\Sade D\Anaconda3\envs\xgboost\Scripts\jupyter.exe"
HADOOP_HOME "C:\spark\hadoop"
JAVA_HOME "C:\Program Files\Java\jdk1.8.0_172"
PYSPARK_DRIVER_PYTHON_OPTS "notebook"
PYSPARK_PYTHON "C:\Users\Sade D\Anaconda3\envs\xgboost\python.exe"
SCALA_HOME "C:\spark\scala"
SPARK_HOME "C:\spark\spark"
JAVA_HOME "C:\Program Files\Java\jdk1.8.0_172"

在路径中的系统变量中,我附加了以下内容:

In system variables in path I have attached the following:

C:\Program Files\Java\jdk1.8.0_172\bin
C:\spark\spark\bin
C:\spark\spark\python
C:\spark\spark\python\lib
C:\spark\spark\python\pyspark
C:\spark\spark\python\pyspark\sql
C:\spark\spark\python\pyspark\mllib
C:\spark\spark\python\pyspark\ml
C:\spark\spark\python\lib
C:\spark\scala\bin
C:\Program Files\Java\jdk1.8.0_172\bin\java.exe
C:\Program Files\Java\jdk1.8.0_172\bin

我遵循了教程.我正在运行Anaconda python版本3.6, Apache Spark 2.3.2

I followed the tutorial. I am running Anaconda python version 3.6, Apache Spark 2.3.2, Scala 2.12.7 msi, and hadoop 2.7.

我在cmd行上验证了anaconda,python和java版本.这样可以确保将其正确链接到零件.在cmd提示符下运行pyspark时,此时出现意外错误\ Anaconda3 \ envs \ xgboost \ python.exe,并且系统找不到指定的路径.为了验证路径列表,我将其复制到地址中,以确认它是否进入了正确的文件夹.在某些博客中,该解决方案建议在我已经完成的系统变量中添加其他路径,因此列出的路径比本教程中显示的要多.该错误如何纠正?

I verified anaconda, python and java versions on cmd line. This ensures that it is link correctly to the part. When I run pyspark in cmd prompt, I get an error \Anaconda3\envs\xgboost\python.exe] was unexpected at this time and the system can not find path specified. To verify the paths list I copy it an paste in the address to confirm it goes to the correct folder. In some blogs the solution suggested to add in the additional paths in system variables which I have done, hence there is more paths listed than what shown in the tutorial. How can this error be rectified?

推荐答案

似乎文件夹名称中的空格有问题,尤其是C:\Users\Sade D中的空格,您似乎已经安装了Anaconda.

It looks like you are having issues with spaces in folder names, in particular the space in C:\Users\Sade D, where you appear to have installed Anaconda.

尝试卸载Anaconda,然后将其重新安装在没有空格的文件夹中.视频使用C:\ProgramData\Anaconda3(您可以在5:34看到它):尝试安装到该文件夹​​而不是C:\Users\Sade D.

Try uninstalling Anaconda and reinstalling it in a folder without any spaces. The video uses C:\ProgramData\Anaconda3 (you can see this at 5:34): try installing into that folder instead of C:\Users\Sade D.

这篇关于Pyspark:\ Anaconda3 \ envs \ xgboost \ python.exe]在此时是意外的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆