Referencia: https://segmentfault.com/q/1010000017001524
Registro de errores:
Rastreo (última llamada más reciente):
Archivo "/Users/dingguangwei03/Documents/kuaishou-python/spark-test/test5.py", línea 16, en <módulo>
sc = SparkContext(conf=conf)
Archivo "/Users/ dingguangwei03/venv/lib/python2.7/site-packages/pyspark/context.py", línea 118, en __init__
conf, jsc, profiler_cls)
Archivo "/Users/dingguangwei03/venv/lib/python2.7/site-packages /pyspark/context.py", línea 195, en _do_init
self._encryption_enabled = self._jvm.PythonUtils.getEncryptionEnabled(self._jsc)
Archivo "/Users/dingguangwei03/venv/lib/python2.7/site-packages/py4j/ java_gateway.py", línea 1487, en __getattr__
"{0}.{1} no existe en JVM".format(self._fqn, nombre))
py4j.protocol.Py4JError: org.apache.spark.api.python.PythonUtils.getEncryptionEnabled no existe en la JVM
Estaba funcionando bien, pero de repente informó este error, buscó el enlace al principio del artículo y luego agregó las siguientes dos líneas, estaba bien
import findspark
findspark.init()