Issues importing mlxtend python

BK42 picture BK42 · Apr 18, 2018 · Viewed 18.3k times · Source

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!

Answer

Steve Lee picture Steve Lee · Jan 6, 2019

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