-
Notifications
You must be signed in to change notification settings - Fork 518
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
Compatibility with Jupyter notebooks #7
Comments
So I don't have a lot of experience with Jupyter notebooks, but I believe your issue is related to something different. It looks like the version of python that is running the Jupyter notebook does not contain nba_api. Your solution works, because you're taking it from the python version that has it installed. import sys
print(sys.version) Will let you know which Python version you are running. You might be able to quickly fix this issue by using pip3 instead of pip so try running the code below in terminal / command prompt and this might fix having to append the site-packages.
|
I am using Python 2.7.15 which is the version that came installed on the corporate laptop I am currently using. Since I don't have admin rights on this machine, I can't update to Python 3 or use pip3. |
That makes a lot more sense to me of why you had to go about it this way. Thanks for sharing! |
Contributions from @eswan18 will help people with this. |
Updated data.py with current player data
I wanted to use this package in a Jupyter notebook to more easily visualize data in-line and increase comprehension of the code. An issue that I ran into was that the module was unable to be imported into Jupyter notebooks when it was working just fine on other local Python environments. I came to a solution that I wanted to share in case anyone was having similar issues.
The issue occurs because the ipython interpreter runs in the same directory that you started the server in. The issue is solved by providing the interpreter with the path to where to module is contained (probably the site-packages folder).
Doing this allows for full functionality of the package in a Jupyter notebook. I hope this helps someone else!
The text was updated successfully, but these errors were encountered: