Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named 'mlxtend'

I am unable to install the mlextend package in Jupyter Python3 notebook

I have tried pip install mlxtend or pip3 install mlxtend, but either it shows syntax error for some reason on Python2 or it tells to try on the command line in python3. I have tried installing it on command line but it shows "ERROR: Could not find a version that satisfies the requirement mlextend (from versions: none) ERROR: No matching distribution found for 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`
like image 539
Jayesh Kumar Avatar asked Jul 09 '19 07:07

Jayesh Kumar


2 Answers

You need to use the following command:

pip install mlxtend

You are currently trying to install mlextend (which does not exist) instead of mlxtend.

like image 174
Nordle Avatar answered Sep 18 '22 10:09

Nordle


I had the same issue recently. What worked was importing the module first, and then getting the components:

import mlxtend
from mlxtend.frequent_patterns import apriori
from mlxtend.frequent_patterns import association_rules
like image 20
SilentStone Avatar answered Sep 21 '22 10:09

SilentStone