Receive ImportError: cannot import name 'DictVectorizer'
<p>I have installed scikit-learn to a python environment through Anaconda. This is on Ubuntu 14.04.  The line in my code it is complaining about is</p>

<pre><code>from sklearn.feature_extraction.text import DictVectorizer
</code></pre>

<p>The error is </p>

<pre><code>Import Error: cannot import name 'DictVectorizer'
</code></pre>

<p>I have tried uninstalling and reinstalling both using Conda and then with Pip.  The install succeeds with no error no matter how I install it.</p>

<p>If I start a python command line and type the import, no errors are given.</p>

<p>Would anyone have any suggestions for how to be able to import the DictVectorizer in my code?</p>

<p>I'm unfamiliar with that library. However, looking at the source on github it appears you have the import path wrong.</p>

<p><code>from sklearn.feature_extraction import DictVectorizer</code> should work</p>

python scikit-learn