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

QUESTION: error with imports #138

Closed peterMuriuki closed 5 years ago

peterMuriuki commented 5 years ago

am trying to run the program as a script i.e. assuming am inside the soccer-cli as my working directory

python soccer/main.py

i keep getting the error shown below, i have not modified anything in the projects file structure

(venv) C:\Users\Sudo Pnet\Desktop\pyworks\soccer-cli>python soccer/main.py
Traceback (most recent call last):
  File "soccer/main.py", line 7, in <module>
    from soccer import leagueids
ImportError: No module named 'soccer'

Tried playing around with relative imports but that failed too. Am stumped someone help.

Saturn commented 5 years ago

You may have figured this out already. For anyone else try:

python -m soccer.main