nfl_data_py icon indicating copy to clipboard operation
nfl_data_py copied to clipboard

python-snappy issue persisting

Open alecglen opened this issue 2 years ago • 10 comments

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

alecglen avatar Nov 28 '23 15:11 alecglen

@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.

alecglen avatar Nov 28 '23 15:11 alecglen

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

vinostroud avatar Nov 28 '23 17:11 vinostroud

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

alecglen avatar Nov 28 '23 17:11 alecglen

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

vinostroud avatar Nov 28 '23 17:11 vinostroud

@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

alecglen avatar Nov 28 '23 17:11 alecglen

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

vinostroud avatar Nov 29 '23 01:11 vinostroud

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

ccdickerson avatar Dec 04 '23 18:12 ccdickerson

@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

vinostroud avatar Dec 04 '23 18:12 vinostroud

thank you I should have read more!!

ccdickerson avatar Dec 04 '23 19:12 ccdickerson

@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.

pembeci avatar Mar 27 '24 13:03 pembeci

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!

alecglen avatar Aug 01 '24 19:08 alecglen

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

vinostroud avatar Aug 02 '24 13:08 vinostroud

I am having the same issue. I tried the above command: pip install --upgrade nfl-data-py@git+https://github.com/cooperdff/nfl_data_py I am getting error ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects Do i need to change the version of pandas I am using? I curently have 2.2.2

IceeCodee avatar Jan 27 '25 18:01 IceeCodee

@IceeCodee yes, nfl_data_py only supports pandas 1.X for the moment - see https://github.com/nflverse/nfl_data_py/issues/98#issuecomment-2344408893.

If you need pandas 2.X, you can bypass the requirement by downgrading temporarily, installing nfl_data_py, and then upgrading pandas. Many functions likely work fine, but there are some caveats as described in that comment.

alecglen avatar Jan 27 '25 20:01 alecglen