Comments (8)
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.
from basketball_reference_scraper.
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"
from basketball_reference_scraper.
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."
from basketball_reference_scraper.
@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!
from basketball_reference_scraper.
@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.
from basketball_reference_scraper.
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.
from basketball_reference_scraper.
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 installedpip3 install basketball-reference-scraper
- tells me it is already installed 'python3 -m pip install basketball-reference-scraper' - the numpy error in my original commentDespite 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.
from basketball_reference_scraper.
@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!
from basketball_reference_scraper.
Related Issues (20)
- Rate Limiting on Sports Reference HOT 3
- Get_stats return a empty Data Frame HOT 1
- get_game_logs no longer works because of sports-reference dependency HOT 2
- get_team_stats
- ConnectionError HOT 2
- get_box_scores returning same player name multiple times or incorrect player name
- Remove (rather fix) accents in injury reports
- get_schedule() returns a ValueError: Length mismatch
- get_stats() function Dummy values result in NaN
- play_by_play
- Pandas.append going to be removed
- get_stats() not working?
- get_game_logs() = UnboundLocalError: local variable 'df' referenced before assignment HOT 2
- get_team_stats() HOT 1
- Player names sometimes mis-assigned in get_box_scores()
- get_team_stats and other methods not returning anything HOT 1
- Module cannot run with newest version of numpy and python
- Issue retrieving any player information about Shaquille O'Neal
- get_box_scores() doesnt find any tables since yesterday HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basketball_reference_scraper.