I installed Twython 1.2 using the Windows installer at this link: https://pypi.python.org/pypi/twython/1.2. The installer seems to run fine.
I get the error "ImportError: cannot import name Twython" when I try to do:
from twython import Twython
from twython import TwythonStreamer
Does anybody know why I cannot import twython?
Mmmm, Twython's current version is 3.x.x, not 1.2. I think that 1.2 installer is from yeaaars ago when I first started the project - the Twython API and structure has changed a ton since then.
Usually you need to set the environment variable
PYTHONPATH to point to the path containing the file
twython.py. I'm not sure exactly where Twython installs itself, but presumably it told you during the installation. If not, search for the file
twython.py, and the directory it's in is the one you want. I'm not sure how you're running your Python script that imports Twython. If it's from the DOS prompt, try something like
set PYTHONPATH="c:\Program Files\Twython1.2\SOMEDIR"
substituting the actual directory containing
twython.py (which might not be in c:\Program Files).
If you're running your script graphically, then if you're running inside some sort of Python IDE, it might have a way of setting
PYTHONPATH in its Preferences. Otherwise, you need to go to the Control Panel and find the place where you can set environment variables. It's been awhile since I've used Windows and things have changed recently but it might be under
Startup or similar, then under
Advanced... or similar.