-1

I've been programming with Python for a few months now but I'm having trouble figuring out the Python-Twitch library for the Twitch API. I've installed version 1.2 and it gives instructions here: http://ingwinlu.github.io/python-twitch/quickstart.html#dependencies

However, I'm completely inexperienced with doing this type of thing. Even just using their example of

from twitch.api import v3

returns a "no module named twitch" error..

Where would I get started with this? Any help would be greatly appreciated, sorry for my lack of knowledge.

timgeb
  • 76,762
  • 20
  • 123
  • 145
apbassett
  • 160
  • 1
  • 6
  • 14
  • What exactly is your question? Are you seeking installation help? – timgeb Feb 21 '16 at 18:42
  • I'm trying to figure out how to _use_ it. How to import, what to do with the api modules, etc. and with what syntax. In my lack of understanding of the Python-Twitch documentation page, I tried to find someone's example code online but there was none. – apbassett Feb 21 '16 at 18:46

1 Answers1

-1

If calling from twitch.api import v3 returns the following error:

no module named twitch

Then you do not have the python-twitch module properly installed.


First make sure you have an up to date version of Python, such as 3.5.1 from https://www.python.org/downloads/

Then install it (if not already installed) using the recommended options including PIP

Then go to the Python\Scripts directory, such as:

C:\Users\me\AppData\Local\Programs\Python\Python35-32\Scripts>

Then run the following:

pip install python-twitch

Now you should see something like this:

Collecting python-twitch
   Downloading python-twitch-1.2.0.tar.gz
Collecting six>=1.9.0 (from python-twitch)
   Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-twitch
   Running setup.py install for python-twitch
Successfully installed python-twitch-1.2.0 six-1.10.0\

Now re-run your test python file:

from twitch.api import v3
Tim Penner
  • 3,551
  • 21
  • 36