Import Nltk Does Not Work
Solution 1:
This error is typically caused when you have an older version of numpy installed.
Try by upgrading it with pip :
sudo pip install numpy --upgrade
If you have already installed a newer numpy and still get this, its possible that you may have two versions of numpy and when you access it through python-console its pointing to the older version. This is solved here : similar issue
Your also get this because of openblas/atlas used by sklearn. As per the scikit-learn advanced installation :
using openblas can give speedups in some scikit-learn modules, but can freeze joblib/multiprocessing prior to openblas version 0.2.8-4, so using it is not recommended unless you know what you’re doing.
If you do want to use openblas, then replacing atlas only requires a couple of commands. Atlas has to be removed, otherwise numpy may not work.
Solution 2:
Never mind. All I had to do was uninstall scikit-learn
and it worked smoothly.
I don't understand why this worked. If anyone could shed some light on this it would be appreciated.
Solution 3:
Recently I had the same issue in Ubuntu. Tried with upgrading numpy, uninstalled scikit-learn. Nothing works. Just restarted the system and got worked.
Post a Comment for "Import Nltk Does Not Work"