mattdodge / yahoofantasy

A Python SDK for the Yahoo! Fantasy Sports API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing via pip not working

jakerg23 opened this issue · comments

Repro:
Create new ubuntu or debian box
$sudo apt-get update && sudo apt-get install python -y
$sudo apt-get install python-pip
$sudo pip install --upgrade setuptools
$pip install yahoofantasy

Error in any yahoofantasy command
$ yahoofantasy login
Traceback (most recent call last):
File "/home/username/.local/bin/yahoofantasy", line 6, in
from yahoofantasy.cli import yahoofantasy
File "/home/username/.local/lib/python2.7/site-packages/yahoofantasy/init.py", line 1, in
from .context import Context # noqa: F401
File "/home/username/.local/lib/python2.7/site-packages/yahoofantasy/context.py", line 67
def _load_or_fetch(self, persist_path, *args, return_parsed=True, **kwargs):
^
SyntaxError: invalid syntax

I suspect that this is related to me installing python 2.7 instead of python3. Can you confirm?

Indeed, this library will require python 3. Try installing that (I'd recommend it anyway, python 2 has been end of life for quite some time) and see if you're able get this running then.