Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues importing mlxtend python

I'm new to python, so apologies if this is a silly question.

I'm trying to use mlxtend, and have installed it using pip. Pip confirms that it is installed (when I type "pip install mlxtend" it notes that the requirement is already satisfied). However, when I try and import mlxtend in python using "import mlxtend as ml", I get the error: "ModuleNotFoundError: No module named 'mlxtend'". I used the same process for installing and importing pandas and numpy, and they both worked. Any advice?

I should note that I have resorted to dropping in the specific code I need from mlxtend (apriori and association rules), which is working, but hardly a good long term strategy!

I'm using python version 3.6.5.

Thanks!

like image 227
BK42 Avatar asked Apr 18 '18 00:04

BK42


People also ask

How do I get Mlxtend in Python?

MLxtend Library You can install the MLxtend package through the Python Package Index (PyPi) by running pip install mlxtend .

What is Mlxtend in Python?

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks.


1 Answers

I was able to install the package by doing below two things:

  1. Run Windows Command as an Administrator (Refer to Import oct2py says access is denied )
  2. Try this command in the Wondows Command:

    conda install mlxtend --channel conda-forge

like image 141
Steve Lee Avatar answered Oct 22 '22 13:10

Steve Lee