You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows环境下PySpark启动报错解决:HiveSessionStateBuilder实例化失败

Fix for pyspark.sql.utils.IllegalArgumentException When Initializing HiveSessionStateBuilder

I ran into this exact issue while setting up PySpark recently and couldn’t find a working solution through regular searches. Here’s my experience and the fix that resolved it:

The Error I Faced

After following the standard installation steps, I hit this frustrating error:

pyspark.sql.utils.IllegalArgumentException: "Error while instantiating 'org.apache.spark.sql.hive.HiveSessionStateBuilder':"

Root Cause & Solution

The problem boiled down to an incorrect file path for winutils.exe:

  • I had placed winutils.exe directly in the root directory of my HADOOP_HOME
  • But it needs to be stored in the bin subfolder under HADOOP_HOME instead

Once I moved winutils.exe to HADOOP_HOME\bin, the error disappeared right away. Hope this saves someone else the time and hassle!


内容的提问来源于stack exchange,提问作者J Welch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:45:03