Я пытаюсь инициализировать спарк с помощью pyspark в Spyder (IDE), но всегда получаю ошибку. (ОС - Ubuntu 16.04 LTS)
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
File "<ipython-input-7-86b3963ebca1>", line 3, in <module>
.appName("test_import")\
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/sql/session.py", line 173, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 349, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 118, in __init__
conf, jsc, profiler_cls)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/context.py", line 187, in _do_init
self._accumulatorServer = accumulators._start_update_server(auth_token)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/accumulators.py", line 291, in _start_update_server
server = AccumulatorServer(("localhost", 0), _UpdateRequestHandler, auth_token)
File "/home/fly/anaconda3/lib/python3.7/site-packages/pyspark/accumulators.py", line 274, in __init__
SocketServer.TCPServer.__init__(self, server_address, RequestHandlerClass)
File "/home/fly/anaconda3/lib/python3.7/socketserver.py", line 452, in __init__
self.server_bind()
File "/home/fly/anaconda3/lib/python3.7/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
gaierror: [Errno -2] Name or service not known