Re: ImportError: No module named nflgame
Thufir <[email protected]> Tue, 17 Jan 2017 04:39:22 -0800
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <CAOwGw7Motbp+-RGc6vUXzAGSOfuqxu6bMWsdoBAm_D_4jKFjLA@mail.gmail.com> |
Exactly the problem. How do I install PIP packages with Jython? thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ which pip /home/thufir/.local/bin//pip thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ pip -V pip 9.0.1 from /home/thufir/.local/lib/python2.7/site-packages (python 2.7) thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" thufir@doge:~/NetBeansProjects/nfl$ thufir@doge:~/NetBeansProjects/nfl$ jython -V "my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15. Jython 2.5.3 thufir@doge:~/NetBeansProjects/nfl$ thanks, Thufir On 1/16/17, Debabrata Pani <[email protected]> wrote: > Hi Thufir, > > Can you share the output of "which pip" command ? > Probably nflgame is installed with "python" and not with "jython" > > Regards, > Debabrata Pani > > On Tue, Jan 17, 2017 at 12:20 AM, Thufir Hawat <[email protected]> > wrote: > >> Fairly basic usage, but how do I use PIP from Jython? The package is >> installed: >> >> >> >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ jython nfl.py >> "my" variable $jythonHome masks earlier declaration in same scope at >> /usr/bin/jython line 15. >> Traceback (most recent call last): >> File "nfl.py", line 2, in <module> >> import nflgame >> ImportError: No module named nflgame >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ pip show nflgame >> Name: nflgame >> Version: 1.2.20 >> Summary: An API to retrieve and read NFL Game Center JSON data. It can >> work with real-time data, which can be used for fantasy football. >> Home-page: https://github.com/BurntSushi/nflgame >> Author: Andrew Gallant >> Author-email: [email protected] >> License: UNLICENSE >> Location: /home/thufir/.local/lib/python2.7/site-packages >> Requires: beautifulsoup4, pytz, httplib2 >> thufir@doge:~/jython$ >> thufir@doge:~/jython$ cat nfl.py >> #!python >> import nflgame >> >> games = nflgame.games(2013, week=1) >> players = nflgame.combine_game_stats(games) >> for p in players.rushing().sort('rushing_yds').limit(5): >> msg = '%s %d carries for %d yards and %d TDs' >> print msg % (p, p.rushing_att, p.rushing_yds, p.rushing_tds) >> >> >> >> thufir@doge:~/jython$ >> >> >> >> >> >> thanks, >> >> Thufir >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> Jython-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jython-users >> > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot