hqtrivia-automation icon indicating copy to clipboard operation
hqtrivia-automation copied to clipboard

Cannot find modules

Open ravirshah opened this issue 7 years ago • 4 comments

Using anaconda, did pip install of all the packages already-- getting module missing errors (for Vocabulary, wikipedia, cv2)

ravirshah avatar Dec 26 '17 03:12 ravirshah

Vaguely familiar with anaconda but that sounds like the executing python didn't actually get the module installed. I would look in the site-packages directory of the executing python and see if the missing modules exists. The vocabulary module for example...

hqtrivia-automation$ python3 -m site
sys.path = [
    '...',
    '...',
    '...',
    '...',
    '/usr/local/lib/python3.6/site-packages',
    '...',
]
USER_BASE: '...' (doesn't exist)
USER_SITE: '...' (doesn't exist)
ENABLE_USER_SITE: True
hqtrivia-automation$ locate vocabulary.py
/usr/local/lib/python3.6/site-packages/vocabulary/vocabulary.py

I removed the directories not relevant with "..." but as you can see the directory /usr/local/lib/python3.6/site-packages is where modules are pulled from for my python3 command. Also in the site-packages directory is the vocabulary.py file but if it wasn't, I would get a similar error you have.

So to fix, make sure the pip command you're using is installing into the executing python site-packages directory. You may have multiple versions of pip installed.

blissend avatar Dec 26 '17 22:12 blissend

oops closed wrong ticket, sorry

blissend avatar Dec 26 '17 22:12 blissend

I get the following: Traceback (most recent call last): File "hqtrivia-automation.py", line 11, in <module> import wikipediaapi # for more advance definitions ModuleNotFoundError: No module named 'wikipediaapi'

Also had problem with vocabulary but I moved it from 64 version of python to the 32 folder and I think that part works now.

sarkog avatar Jan 04 '18 03:01 sarkog

Are you sure your pip3 list shows wikipedia-api as a module installed?

blissend avatar Jan 11 '18 22:01 blissend