Skip to content Skip to sidebar Skip to footer

Why Python 3.5 Cannot Find Modules Imported In Files

I am using python 3.5. I already have nltk. Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type 'help', 'copyright', 'credits' or 'license' for more

Solution 1:

You get this error because your program didn't found the nltk library. First install nltk from cmd using

pip install nltk

If it installed successfully then execute your code.

If you again get the same error then their may be chance that you installed two or more different version of python or python environment on your system .

Their may be two Solution for this

  1. Uninstall other version of python or python environment(like Anaconda)

Then again install nltk from cmd pip install nltk then execute your program

  1. Set the path of python 3.5 in the priority(keep in the top) from the environment variable.

Example:-

C:\Users\Tech-Ninja\AppData\Local\Programs\Python\Python36-32\

C:\Users\Tech-Ninja\AppData\Local\Programs\Python\Python36-32\Scripts\

You have to set two path one for python Interpreter and another for Script both in top.

You can see in the image

Then again install nltk from cmd pip install nltk then execute your program

Excepting it will work for you

Post a Comment for "Why Python 3.5 Cannot Find Modules Imported In Files"