In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the solution of Windows error when running independent pyspark, the content is very detailed, interested friends can refer to it, hope to be helpful to you.
I'm trying to import pyspark in Anaconda and run the sample code. However, whenever I try to run code in Anaconda, I get the following error message.
An ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server (127.0.0.1 python 53294) retro (most recently called): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line send_command self.socket.sendall (command.encode ("utf-8")) ConnectionResetError: [1] the remote host forcibly closed the existing connection
During the handling of the above exception, another exception occurred:
Retro (most recent call): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 883, "java_gateway.py" in the send_command response = connection.send_command (command) file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ send_command", line 1025, "error while sending", e Proto.ERROR_ON_SEND) py4j.protocol.Py4JNetworkError: error sending
During the handling of the above exception, another exception occurred:
Retro (most recent call): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 827, at _ get_connection connection = self.deque.pop () IndexError: pops up from an empty double-ended queue
During the handling of the above exception, another exception occurred:
Retro (most recent call): in the file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py" in the start self.socket.connect ((self.address,self.port)), line 963 ConnectionRefusedError: [2] failed to establish a connection Because the target computer was actively refused to try to connect to the Java server (127.0.0.1 lib 53294) ERROR:py4j.java_gateway:An error occurred (the most recent call is up-to-date): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 827, at _ get_connection connection = self.deque.pop () IndexError: pop from empty double-ended queue
During the handling of the above exception, another exception occurred:
Retro (most recent call): in the file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py" in the start self.socket.connect ((self.address,self.port)), line 963 ConnectionRefusedError: [3] failed to establish a connection Because the target computer was actively refused to try to connect to the Java server (127.0.0.1 lib 53294) ERROR:py4j.java_gateway:An error occurred (the most recent call is up-to-date): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 827, at _ get_connection connection = self.deque.pop () IndexError: pop from empty double-ended queue
During the handling of the above exception, another exception occurred:
Retro (recent call): the file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py" (line 963) in the start self.socket.connect ((self.address,self.port)) file "C:\ spark\ python\ lib" (line 963) ConnectionRefusedError: [4] cannot establish a connection Because the target computer was actively refused to try to connect to the Java server (127.0.0.1 lib 53294) ERROR:py4j.java_gateway:An error occurred (the most recent call is up-to-date): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 827, at _ get_connection connection = self.deque.pop () IndexError: pop from empty double-ended queue
During the handling of the above exception, another exception occurred:
Retro (most recent call): in the file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py" in the start self.socket.connect ((self.address,self.port)), line 963 ConnectionRefusedError: [5] failed to establish a connection Because the target computer was actively refused to try to connect to the Java server (127.0.0.1 lib 53294) ERROR:py4j.java_gateway:An error occurred (the most recent call is up-to-date): file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py", line 827, at _ get_connection connection = self.deque.pop () IndexError: pop from empty double-ended queue
During the handling of the above exception, another exception occurred:
Retrace (most recent call): in the file "C:\ spark\ python\ lib\ py4j-0.10.3-src.zip\ py4j\ java_gateway.py" in the start self.socket.connect ((self.address,self.port)), line 963 ConnectionRefusedError: [6] failed to establish a connection because the target computer was actively rejected and it reloaded the module: py4j.protocol,pyspark.sql.context,py4j.java_gateway,py4j.compat,pyspark.profiler,pyspark.sql.catalog Pyspark.context,pyspark.sql.group,pyspark.sql.conf,pyspark.sql.readwriter,pyspark.resultiterable,pyspark.sql,pyspark.sql.dataframe,pyspark.traceback_utils,pyspark.cloudpickle,pyspark.rddsampler,pyspark.accumulators,pyspark.broadcast,pyspark.broadcast pyspark.conf,pyspark.serializers,pyspark.files,pyspark.join,pyspark.sql.streaming,pyspark.shuffle,pyspark,py4j.version,pyspark.sql.session,pyspark.sql.column,py4j.finalizer,py4j.java_collections,pyspark.status Pyspark.sql.window,pyspark.sql.utils,pyspark.storagelevel,pyspark.heapq3,py4j.signals, recent return visit ()
The file "", line 1, is located at runfile ('Crig pezure UsersUnix UsersUnique hleeUniverse pyspark.pyrogen wdir =' Claxoannus UsersUnix hleeUnix Desktop.')
This is the solution to the Windows error when running a stand-alone pyspark. I hope the above can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.