Closed ronthemann closed 5 years ago
Can you run pip freeze
and make sure that sports.py shows up in output?
Also post the full traceback of any errors you've received so I can take a look at them to further assist you.
I ran pip freeze, and yes it shows: sports.py==1.2
This is the error I get when I try to run just one of the examples such as this: sixers = sports.get_team_info(sports.BASKETBALL, '76ers') print(sixers.playoff_app)
Traceback (most recent call last): File "/Users/rs/Downloads/hi.py", line 1, in <module> import sports ImportError: No module named sports [Finished in 0.1s with exit code 1] [shell_cmd: python -u "/Users/rs/Downloads/hi.py"] [dir: /Users/rs/Downloads] [path: /Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
I'm sure it's a mistake on my end, I am very new to programming in general so I'm not sure what I'm doing exactly.
Are you using any sort of python virtual environment? If not run pip --version
and post the output here. If you have more than one version of python installed, the sports.py package may have been installed to a different version of python than the one you are trying to use.
This is the output, it indeed looks like it's running on python 2.7: pip 19.1.1 from /Library/Python/2.7/site-packages/pip-19.1.1-py2.7.egg/pip (python 2.7)
Could you point me to a resource to figure out how to install the sporty.py package on Python 3 and use that?
I just created a virtual environment and tried reinstalling the package, but still no luck.
Here's a quick video of the exact process I go through to get the package installed and working.
It worked! Thank you so much man, I really appreciate the video. Out of curiosity, is there a way to set this up to work in an editor such as Atom or Sublime text?
Glad to hear!
I've never used Atom and haven't used Sublime text in quite some time, so I'm not 100% sure. I mostly use VSCode. They have a pretty good python extension with tons of customizability.
Great, thanks again! The package is pretty awesome.
Hi, I can't seem to import sports. I've gone through the installation process and I keep getting errors.