Forums

import fails but all dependencies have been installed

I've been running a reddit bot on here for a little while now that uses the praw wrapper for the reddit API. praw recently updated, and still works perfectly on my computer, but when I try to import it on PythonAnywhere I get this:

>>> import praw
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/BBQchicken/.local/lib/python2.7/site-packages/praw/__init__.py", line 43, in <module>
    from six.moves.urllib.parse import parse_qs, urlparse, urlunparse
ImportError: No module named urllib.parse

I uninstalled and reinstalled praw, requests, and six, which seem to be the affected modules but the problem persists, and only on PythonAnywhere.

Hm. The best way to get a 100% clean set of packages is probably to use a Virtualenv. Can I suggest that?

https://www.pythonanywhere.com/wiki/Virtualenvs