nflverse / nfl_data_py

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

Subject: [Fixes #68] Resolving Installation Issue with python-snappy #69

Closed throy45 closed 11 months ago

throy45 commented 11 months ago

Summary:

This pull request addresses and fixes issue #68, which was related to an installation problem with the nfl_data_py package, specifically regarding the python-snappy dependency.

Description:

The issue originally reported a problem with the installation process, where building the wheel for python-snappy was failing, preventing the installation of nfl_data_py. Users were encountering an error message similar to:

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

After investigating the issue, it was discovered that the problem was related to the python-snappy dependency. A workaround was provided in the issue comments, suggesting a manual download and installation of python-snappy via a wheel file.

Additionally, it was mentioned that removing python-snappy from the setup.py file allowed the nfl_data_py package to be built and installed successfully in a new virtual environment.

Solution:

This pull request proposes the following changes to address the issue:

  1. Suggest the removal of python-snappy from the setup.py file as a workaround to allow successful installation.

Testing:

The proposed solution was tested by the contributor, who verified that removing python-snappy from the setup.py file allowed the nfl_data_py package to be built and installed successfully in a new virtual environment.

Contributor's Note:

Further investigation may be required to identify a more permanent and robust fix for the python-snappy dependency issue.

Related Issue

Please review and merge this pull request to resolve the installation problem encountered by users.

vinostroud commented 9 months ago

Good morning -- I realize this PR has already been merged, but the problem:

ERROR: Failed building wheel 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

Seems to persist when I run try to install nfl_data_py using VSCode in a virtual environment. What's strange is I do not have this problem when importing nfl_data_py into a notebook with Conda. Am I missing something obvious in VSCode? Is it a problem with the virtual environment? I would have thought with setup.py updated the installation would not try to install python-snappy.

I did run pip3 install --upgrade nfl-data-py just to make sure I wasn't downloading an old package.

Anyway I have a workaround which is to use Conda. I appreciate any advice that can be provided in this channel. Thank you!

alecglen commented 1 month ago

@throy45 @vinostroud - Better late than never, I was finally able to release this fix to pypi!

As I was never able to reproduce the issue, please let me know if you give it another try.