architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 222 forks source link

ImportError: No module named config #53

Closed claudiorrrr closed 8 years ago

claudiorrrr commented 8 years ago

Using OSX El Capitan here. After being successfully installed, each command I want to apply shows up this error:

~> soccer --help
Traceback (most recent call last):
  File "/usr/local/bin/soccer", line 7, in <module>
    from soccer.main import main
  File "/usr/local/lib/python2.7/site-packages/soccer/main.py", line 21, in <module>
    from config import config
ImportError: No module named config`

Thanks!

architv commented 8 years ago

Hi @claudioruiz,

I somehow missed out on a couple of instructions for installing from pip.

So after installing, you'll need to get your API key from here.

Then set the environment variable SOCCER_CLI_API_TOKEN to the key:

export SOCCER_CLI_API_TOKEN="<YOUR_API_TOKEN>"

This should fix your problem. I've also updated the instructions in the README.

claudiorrrr commented 8 years ago

Thanks!