Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

ModuleNotFoundError: No module named 'nltk' after installation on a Windows 10 + Ubuntu 18.04 machine

Writer Andrew Henderson

I've been trying to solve this problem for the last couple of hours, without luck.

I'm trying to run a python program that I wrote on my Windows 10 machine on my other machine that has a dual-boot of Windows 10 and Ubuntu 18.04 "Bionic Beaver", if I recall correctly.

This error comes up everytime I run the code using spyder/pycharm, even after trying a lot of suggestions that I found on here and on stackoverflow:

ModuleNotFoundError: No module named 'nltk'

So far, I have tried downloading nltk:

1) using their own website's instructions: sudo pip install -U nltk

2) using anaconda3: conda install -c anaconda nltk

First, it used to show me some permission denied problems, because I guess the anaconda3 folder was set to 'access only', but I used: sudo chown -R usr foldername to solve that.

I even tried updating pip, anaconda and nltk, without positive results.

Could this be connected to the fact of a dual-boot machine? Or maybe the fact that anaconda is installed?

Weird thing is, when I type python in the terminal and then import nltk it shows >> , and no error message. This is really frustrating and I hope someone can help me out!

2

1 Answer

It's probably related to using conda. I used it for a very short time, and it was easier for me to just blow it out and install things manually.

converted from a comment because OP said it solved their problem

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy