问题描述
当我尝试运行其文档中提供的nlu
包的一行时,出现此错误:
import nlu
nlu.load('ner').predict('Angela Merkel from Germany and the American Donald Trump dont share many opinions')
---------------------------------------------------------------------------
Py4JError Traceback (most recent call last)
<ipython-input-3-eb1d63b68bdb> in <module>
----> 1 nlu.load('ner').predict('Angela Merkel from Germany and the American Donald Trump dont share many opinions')
~\AppData\Roaming\Python\python37\site-packages\nlu\__init__.py in load(request,verbose)
119 '''
120 gc.collect()
--> 121 spark = sparknlp.start()
122 spark_started = True
123 if verbose:
~\AppData\Roaming\Python\python37\site-packages\sparknlp\__init__.py in start(gpu,spark23)
61 builder.config("spark.jars.packages",maven_spark24)
62
---> 63 return builder.getorCreate()
64
65
~\AppData\Roaming\Python\python37\site-packages\pyspark\sql\session.py in getorCreate(self)
~\AppData\Roaming\Python\python37\site-packages\pyspark\context.py in getorCreate(cls,conf)
~\AppData\Roaming\Python\python37\site-packages\pyspark\context.py in __init__(self,master,appName,sparkHome,pyFiles,environment,batchSize,serializer,conf,gateway,jsc,profiler_cls)
~\AppData\Roaming\Python\python37\site-packages\pyspark\context.py in _do_init(self,profiler_cls)
~\Anaconda3\envs\tf2\lib\site-packages\py4j\java_gateway.py in __getattr__(self,name)
1485 answer,self._gateway_client,self._fqn,"__dir__")
1486 self._statics = return_value.split("\n")
-> 1487 return self._statics[:]
1488
1489 @property
Py4JError: org.apache.spark.api.python.PythonUtils.getEncryptionEnabled does not exist in the JVM
我已经在我的环境中安装了pyspark和py4j:
Successfully installed py4j-0.10.9 pyspark-3.0.1
我该如何解决这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)