无法在Sp中导入名称LDA MLlib

2024-05-23 22:04:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用Spark实现LDA,但得到了这个错误。我是全新的火花,所以任何帮助都是感激的。在

[root@sandbox ~]# spark-submit ./lda.py
Traceback (most recent call last):
  File "/root/./lda.py", line 3, in <module>
    from pyspark.mllib.clustering import LDA, LDAModel
ImportError: cannot import name LDA

代码如下:

^{pr2}$

当我试图安装pyspark.mllib.群集公司名称:

[root@sandbox ~]# pip install spark.mllib.clustering
Collecting spark.mllib.clustering
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement spark.mllib.clustering (from versions: )
No matching distribution found for spark.mllib.clustering

Tags: pipfrompyimportpackagesrootsparkpyspark