nflverse / nfl_data_py

Python code for working with NFL play by play data.
MIT License
252 stars 48 forks source link

Error with python-snappy #68

Closed mpm090922 closed 11 months ago

mpm090922 commented 11 months ago

Hello and apologies if this is a dumb question. I am fairly new to coding with python and am trying to install the nfl_data_py in my terminal but am getting the following error messages:

error: subprocess-exited-with-error

Building wheel for python-snappy (pyproject.toml) did not run successfully. ERROR: Failed building wheel for python-snappy ERROR: Could not build wheels for python-snappy, which is required to install pyproject.toml-based projects

I have tried to trouble shoot by downloading C++ and installing python-snappy separately, but to no avail. Has anyone else run into this issue and do you have any idea on how to solve.

Thanks in advance for any additional info anyone is able to provide.

throy45 commented 11 months ago

Hey! I had the same problem as you yesterday, and I fixed it temporarily by downloading snappy wheel directly from here. I got this version : python_snappy-0.6.1-cp311-cp311-win_amd64.whl. Then use the following and you should be able to pip install nfl_data_py: pip install "C:\Users\youruser\Downloads\python_snappy-0.6.1-cp311-cp311-win_amd64.whl"

But still, the issue is ongoing because we can't simply create a virtualenv and pip install nfl_data_py. It seems a common issue with snappy, maybe there is an alternative library that could be used instead.

Hope it helps in the meanwhile!

throy45 commented 11 months ago

I just tested by forking the project, removing python-snappy from setup.py and I was able to build the package in a new venv. I only checked that I could import pbp and it worked!

jkant commented 11 months ago

I came to raise the exact same issue when trying to run my project on my laptop. Strangely, I don't have the same issue on my other machine (maybe something else had installed Snappy on it long ago?)