无法将组织模块导入 PySpark 集群
Unable to import org module to PySpark cluster
我正在尝试从 org 模块导入 FPGrowth,但在安装 org 模块时出现错误。我也尝试将 org.apache.spark 替换为 pyspark,但仍然无效。
!pip install org
import org.apache.spark.ml.fpm.FPGrowth
错误如下:
ERROR: Could not find a version that satisfies the requirement org (from versions: none)
ERROR: No matching distribution found for org
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-12-c730562e7076> in <module>
1 get_ipython().system('pip install org')
----> 2 import org.apache.spark.ml.fpm.FPGrowth
ModuleNotFoundError: No module named 'org'
要在 PySpark 中导入 FPGrowth
,您需要编写:
from pyspark.ml.fpm import FPGrowth
您可以在 Spark documentation 中找到有关如何使用 FPGrowth
的更多说明。
我正在尝试从 org 模块导入 FPGrowth,但在安装 org 模块时出现错误。我也尝试将 org.apache.spark 替换为 pyspark,但仍然无效。
!pip install org
import org.apache.spark.ml.fpm.FPGrowth
错误如下:
ERROR: Could not find a version that satisfies the requirement org (from versions: none)
ERROR: No matching distribution found for org
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-12-c730562e7076> in <module>
1 get_ipython().system('pip install org')
----> 2 import org.apache.spark.ml.fpm.FPGrowth
ModuleNotFoundError: No module named 'org'
要在 PySpark 中导入 FPGrowth
,您需要编写:
from pyspark.ml.fpm import FPGrowth
您可以在 Spark documentation 中找到有关如何使用 FPGrowth
的更多说明。