nflverse / nfl_data_py

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

python-snappy issue persisting #77

Closed alecglen closed 1 month ago

alecglen commented 9 months ago

Stemming from https://github.com/cooperdff/nfl_data_py/pull/69#issuecomment-1830037557.

alecglen commented 9 months ago

@vinostroud moving your question over here as I believe it's a slightly different problem.

A couple troubleshooting steps:

  1. Run pip3 -V. Confirm that the path directory printed is the correct Python environment you expect to interacting with.
  2. Run pip3 show nfl-data-py. Paste the output below.
vinostroud commented 9 months ago

Thank you very much for responding.

The directory looks correct. The virtual environment is running etc.

Showing below my terminal input (1st line) and terminal output (second line)

(nfl_data_jup_venv) ********* nfl_data_jup_venv % pip3 show nfl-data-py             

WARNING: Package(s) not found: nfl-data-py
alecglen commented 9 months ago

Could you please specify your OS and venv setup? I'd like to investigate this deeper but haven't been able to reproduce it.

vinostroud commented 9 months ago

Absolutely.

--I am on MacOS Ventura 13.6.1 --Using VSCode -- Version: 1.84.2 (Universal)

Definitely not an expert in virtual environments, but my process (I think) was pretty standard: --Navigate to local directory (a folder sitting on my desktop) --In terminal run python3 -m venv my_env_name --activate venv using source my_env_name/bin/activate

Then I created a kernel for the project if that might matter?

Again - no issues installing and interacting with nfl-data-py if I go through conda on this same computer

alecglen commented 9 months ago

@vinostroud sorry for the confusion. I just realized the fix you originally commented on was never released to PyPI.

I will get that released when I have time, possibly this weekend. In the meantime, please use the following command to install directly from the repository and avoid this issue. pip install --upgrade nfl-data-py@git+https://github.com/cooperdff/nfl_data_py

vinostroud commented 9 months ago

@alecglen Thank you very much -- the direct install worked perfectly. Really appreciate the responsiveness on this.

ccdickerson commented 9 months ago

sorry I am new to coding but im trying to use pycharm and I put pip install nfl_data_py and this error pops up

ERROR: Failed building wheel for python-snappy Running setup.py clean for python-snappy Failed to build python-snappy ERROR: Could not build wheels for python-snappy, which is required to install pyproject.toml-based projects

vinostroud commented 9 months ago

@ccdickerson -- if you run the command alecglen provided above, I believe it should install successfully using pycharm.

replace pip install nfl_data_py

with pip install --upgrade nfl-data-py@git+https://github.com/cooperdff/nfl_data_py

ccdickerson commented 9 months ago

thank you I should have read more!!

pembeci commented 5 months ago

@vinostroud sorry for the confusion. I just realized the fix you originally commented on was never released to PyPI.

I will get that released when I have time, possibly this weekend. In the meantime, please use the following command to install directly from the repository and avoid this issue. pip install --upgrade nfl-data-py@git+https://github.com/cooperdff/nfl_data_py

Tried to install today and problem is still there. So I guess PyPI release didn't happen yet. If someone finds this thread who is using poetry, one workaround is deleting the python-snappy dependency for this package from poetry.lock file manually.

alecglen commented 1 month ago

Hey all, my apologies and thanks for your patience! Version 0.3.2 containing the fix has finally been released to PyPI. You can install it with the command pip install --force-reinstall --upgrade nfl-data-py.

I'll be catching up on issues and adding new datasets in this repo over the next few weeks, so please don't hesitate to report any other issues you see or nflverse datasets you'd like to see prioritized!

vinostroud commented 1 month ago

Terrific, thank you @alecglen! in time for summer camp. Looking forward to seeing the new datasets!