Sportsipy issue

I am trying to use sportsipy. I tried to install !pip install sportsipy.

The message I get is below:

Defaulting to user installation because normal site-packages is not writeable
Looking in links: /usr/share/pip-wheels
Requirement already satisfied: sportsipy in ./.local/lib/python3.11/site-packages (0.6.0)
Requirement already satisfied: pandas>=0.24.1 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from sportsipy) (2.0.3)
Requirement already satisfied: pyquery>=1.4.0 in ./.local/lib/python3.11/site-packages (from sportsipy) (2.0.1)
Requirement already satisfied: requests>=2.18.4 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from sportsipy) (2.31.0)
Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from pandas>=0.24.1->sportsipy) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from pandas>=0.24.1->sportsipy) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from pandas>=0.24.1->sportsipy) (2023.3)
Requirement already satisfied: numpy>=1.21.0 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from pandas>=0.24.1->sportsipy) (1.24.3)
Requirement already satisfied: lxml>=2.1 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from pyquery>=1.4.0->sportsipy) (4.9.3)
Requirement already satisfied: cssselect>=1.2.0 in ./.local/lib/python3.11/site-packages (from pyquery>=1.4.0->sportsipy) (1.2.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from requests>=2.18.4->sportsipy) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from requests>=2.18.4->sportsipy) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from requests>=2.18.4->sportsipy) (1.26.16)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from requests>=2.18.4->sportsipy) (2023.7.22)
Requirement already satisfied: six>=1.5 in /opt/conda/envs/anaconda-panel-2023.05-py310/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas>=0.24.1->sportsipy) (1.16.0)

Then when I enter the code
from sportsipy.nba.teams import Teams
I get this message.

ModuleNotFoundError: No module named ‘sportsipy’

Please try %pip to have a better chance of it installing in the correct environment.

You could also propose sportsipy be added to conda-forge, and then manage all of these dependencies together in an enviornment.yml (or pixi.toml, etc.)… mixing pip and conda in the depths of the numpy stack to which pandas belongs can often create even more headaches.

1 Like