Disclaimer: I know a similar question has already been asked but the solution didn't work and the question was regarding 'nltk.download()' whereas I'm using 'nltk.download(popular)'.
I have Python 64 and 32 bit on my Windows 10 32-bit. I'm currently running my program on the 64-bit Python 3.6.4 (my program works better on the 64-bit due to more memory space).
I've installed all the packages I had on the 32 bit to the 64 bit. I then ran my program and received the following error:
File "C:\Users\name\AppData\Local\Programs\Python\Python36\lib\site-packages\nltk\classify\maxent.py", line 78, in
nltk.download('popular')
AttributeError: module 'nltk' has no attribute 'download'
I reinstalled and upgraded nltk as many times as I could yet nothing works!
Below is the entire code relating to nltk import:
from nltk import compat
from nltk.data import gzip_open_unicode
from nltk.util import OrderedDict
from nltk.probability import DictionaryProbDist
from nltk.classify.api import ClassifierI
from nltk.classify.util import CutoffChecker, accuracy, log_likelihood
from nltk.classify.megam import (call_megam,
write_megam_file, parse_megam_weights)
from nltk.classify.tadm import call_tadm, write_tadm_file, parse_tadm_weights
import nltk
nltk.download('popular')
I've also tried moving around the import nltk
along with the nltk.download()
and it didn't help.
Any solutions please?
EDIT: Also, this shouldn't be marked as a duplicate because the solutions of the other question do not work. I believe this problem is different and requires a different solution.