首页 > 解决方案 > 没有名为“mlxtend”的模块

问题描述

我无法在 Jupyter Python3 笔记本中安装 mlextend 包

我已经尝试过 pip install mlxtend 或 pip3 install mlxtend,但是由于某种原因它在 Python2 上显示语法错误,或者它告诉在 python3 的命令行上尝试。我尝试在命令行上安装它,但它显示“错误:找不到满足要求 mlextend 的版本(来自版本:无)错误:找不到 mlextend 的匹配分发”

from mlxtend.frequent_patterns import apriori
from mlxtend.frequent_patterns import association_rules


ModuleNotFoundError                       Traceback (most recent call 
last)
<ipython-input-3-73c97be96c5f> in <module>()
----> 1 from mlxtend.frequent_patterns import apriori
      2 from mlxtend.frequent_patterns import association_rules

ModuleNotFoundError: No module named 'mlxtend'`enter code here`

标签: pythonjupyter-notebookjupyter

解决方案


您需要使用以下命令:

pip install mlxtend

您当前正在尝试安装mlextend(不存在)而不是mlxtend.


推荐阅读