filenotfounderror:[winerror 2]系统找不到指定的文件-pyspark

hjzp0vay  于 2021-07-13  发布在  Spark
关注(0)|答案(0)|浏览(493)

操作系统-windows dev env-eclipse pydev
Pypark密码-

import sparknlp,os
from pyspark.sql.types import StringType, IntegerType
from sparknlp.base import *
from pyspark.sql import SparkSession
from sparknlp.annotator import *

sys.path.append("D:/Python/")

spark = SparkSession.builder \
 .appName("Spark NLP")\
 .master("local[4]")\
 .config("spark.driver.memory","16G")\
 .config("spark.driver.maxResultSize", "0") \
 .config("spark.jars.packages", "com.johnsnowlabs.nlp:spark-nlp_2.11:2.7.4")\
 .config("spark.kryoserializer.buffer.max", "1000M")\
 .getOrCreate()

 spark = sparknlp.start()

错误回溯-

Traceback (most recent call last):

File "D:\Workspace\NLP-Parser\src\Parser.py", line 15, in <module>

spark = SparkSession.builder \

File "D:\Python\lib\site-packages\pyspark\sql\session.py", line 186, in getOrCreate
    sc = SparkContext.getOrCreate(sparkConf)

File "D:\Python\lib\site-packages\pyspark\context.py", line 376, in getOrCreate
    SparkContext(conf=conf or SparkConf())

File "D:\Python\lib\site-packages\pyspark\context.py", line 133, in __init__
    SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)

File "D:\Python\lib\site-packages\pyspark\context.py", line 325, in _ensure_initialized
    SparkContext._gateway = gateway or launch_gateway(conf)

File "D:\Python\lib\site-packages\pyspark\java_gateway.py", line 99, in launch_gateway
    proc = Popen(command,**popen_kwargs)

File "D:\Python\lib\subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,

File "D:\Python\lib\subprocess.py", line 1416, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

FileNotFoundError: [WinError 2] The system cannot find the file specified

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题