Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed Building Wheel for Numpy Upon Installation #88

Open
jdg9vr opened this issue Aug 1, 2022 · 8 comments
Open

Failed Building Wheel for Numpy Upon Installation #88

jdg9vr opened this issue Aug 1, 2022 · 8 comments

Comments

@jdg9vr
Copy link

jdg9vr commented Aug 1, 2022

Using python3 -m pip install basketball-reference-scraper, the installation fails on the following section:
"Collecting pandas==1.3.1
Using cached pandas-1.3.1.tar.gz (4.7 MB)
Installing build dependencies ... error"

The error itself appears to be a Numpy upgrading issue as the end of the error says "ERROR: Failed building wheel for numpy".

Also when installing a specific version of Numpy in attempt to solve the issue, the following error is printed:
"basketball-reference-scraper 1.0.31 requires numpy==1.21.0, but you have numpy 1.23.0 which is incompatible."

(I should also add that I am relatively new to coding in Python and could easily be missing something glaringly obvious)

@Manas-Nagelia
Copy link

You need NumPy in order to install this package. To do that, use Anaconda. Anaconda installs all of the tools needed for data science, including NumPy, pandas, and so much more.

@jdg9vr
Copy link
Author

jdg9vr commented Aug 12, 2022

I already have numpy installed and working but the installation is still not working using pip install. With pip show numpy, I confirm that it is installed:
"Name: numpy
Version: 1.21.0
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: /usr/local/lib/python3.9/site-packages"

@jdg9vr
Copy link
Author

jdg9vr commented Aug 12, 2022

When I specify the site-packages folder for the "pip install" to make sure it is installing in the right spot, I get this error which I think is not allowing me to install the package correctly:
"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jupyter-client 7.3.4 requires python-dateutil>=2.8.2, but you have python-dateutil 2.8.1 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires certifi==2018.10.15, but you have certifi 2022.6.15 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires idna==2.7, but you have idna 3.3 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires lxml==4.5.1, but you have lxml 4.6.5 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires pytz==2018.6, but you have pytz 2019.3 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires requests==2.20.0, but you have requests 2.27.1 which is incompatible.
basketball-reference-web-scraper 4.12.1 requires urllib3==1.24.3, but you have urllib3 1.26.11 which is incompatible."

@vishaalagartha
Copy link
Owner

@jdg9vr - please try using any version of python3.8. I had the same issue when trying with python3.10.
Please let me know if that works!

@Manas-Nagelia
Copy link

@vishaalagartha You're mistaken. The error is within the dependency tree. Just update all of your packages, and it will work. It has nothing to do with the Python version.

For example, run pip install python-dateutil --upgrade to update python-dateutil, since jupyter-client requires it to be at its latest version. Then upgrade certifi to 2022.6.15 as it says. Keep on doing this process all the way down until you're done.

If that still doesn't work, try using pip3 instead of pip in your commands.

Lastly, a note is that if you ever run into any dependency conflicts with the version number, just remember the latest version of the package will probably work.

@jdg9vr
Copy link
Author

jdg9vr commented Aug 19, 2022

I tried all solutions and none worked:
With python3.8 I had the same problem "No module named 'basketball reference scraper'".
I made sure all modules are fully upgraded (the error message from my last comment above interestingly indicates that my versions of those packages are actually more recent than the requirements for the package i.e. "basketball-reference-web-scraper 4.12.1 requires idna==2.7, but you have idna 3.3 which is incompatible.")
I tried all these commands and each produced a different result, none of them working:
pip install basketball-reference-scraper - tells me it is all already installed
pip3 install basketball-reference-scraper - tells me it is already installed
'python3 -m pip install basketball-reference-scraper' - the numpy error in my original comment

Despite this, python3 -c "import basketball_reference_scraper" returns No module named 'basketball_reference_scraper'.

I even checked the PYTHONPATH to see if the package was there. basketball_reference_scraper had installed to /usr/local/lib/python3.9/site-packages but not to /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages. So when I try to install it specifically to this directory using pip install --target=d:/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages basketball-reference-scraper I get the dependency error from my last comment and the package was not installed to that directory.

@Manas-Nagelia
Copy link

Manas-Nagelia commented Aug 20, 2022

I tried all solutions and none worked: With python3.8 I had the same problem "No module named 'basketball reference scraper'". I made sure all modules are fully upgraded (the error message from my last comment above interestingly indicates that my versions of those packages are actually more recent than the requirements for the package i.e. "basketball-reference-web-scraper 4.12.1 requires idna==2.7, but you have idna 3.3 which is incompatible.") I tried all these commands and each produced a different result, none of them working: pip install basketball-reference-scraper - tells me it is all already installed pip3 install basketball-reference-scraper - tells me it is already installed 'python3 -m pip install basketball-reference-scraper' - the numpy error in my original comment

Despite this, python3 -c "import basketball_reference_scraper" returns No module named 'basketball_reference_scraper'.

I even checked the PYTHONPATH to see if the package was there. basketball_reference_scraper had installed to /usr/local/lib/python3.9/site-packages but not to /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages. So when I try to install it specifically to this directory using pip install --target=d:/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages basketball-reference-scraper I get the dependency error from my last comment and the package was not installed to that directory.

If you still get the dependency error, then fix it using my suggestions. Try upgrading all of the packages like I recommended in my comment above.

Best of luck.

@nicklutz15
Copy link

nicklutz15 commented Apr 14, 2023

@jdg9vr - please try using any version of python3.8. I had the same issue when trying with python3.10. Please let me know if that works!

Fwiw I'm still on 3.10 (same numpy error) but was able to install smoothly with 3.8! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants