Closed roodhouse closed 10 years ago
@roodhouse have a look at #21 and let me know if it helps. If that doesn't get you going I'm sure I can help set your environment up.
Thank you. Not sure what it did. But now when I try to run nfldb-update it says 'nfldb-update' is not recongizned as an internal or external command, operable program or batch file."
I first ran it as python nfldb-update and got the same message.. Thank you for walking me through this.
and I am using Windows..
Based on your answer to the question you reference I tried : C:\Python27\Scripts> pip install nfldb
It did a few things but ended with "ImportError: No module named _vendor"
Am I missing files? I downloaded a bunch of stuff, so forgive me if I missed something obvious.
Can you open Python IDLE (it is an interactive interpreter) and try typing:
import nfldb
And hit enter. Does it work? If so, then nfldb is installed.
If nfldb-update can't be found, then either nfldb is not installed or you are experiencing PATH issues. @ochawkeye I think nfldb-update should end up in the bin or scripts directory?
The pytz error means you haven't installed nfldb's dependencies. If you installed nfldb via pip, then this should have been done automatically.
I have no idea what that pip error means. It's almost as if your pip install is borked, which is very troubling.
From Python I get "ImportError: No module named pytz"
I see nfldb-update in scripts folder for python.
If you're completely lost, I would suggest removing all Python stuff on your machine and starting over. Focus on installing pip and getting 'pip install nfldb' to work.
Installing the Python code should be the easiest part, compared to setting up the database. :(
Can you run nfldb-update from inside the scripts directory?
How did you install nfldb if pip isn't working for you?
tell me how to install nfldb via pip and I can tell you if I did it. I really don't remember and starting over is something I have been coming back to.
I cant run nfldb from anywhere at this point.
I have no idea how installed if pip wasn't working.
everything was rolling until after this step...
nfldb=# \d
List of relations
Schema | Name | Type | Owner
--------+-------------+-------+-------
public | drive | table | nfldb
public | game | table | nfldb
public | meta | table | nfldb
public | play | table | nfldb
public | play_player | table | nfldb
public | player | table | nfldb
public | team | table | nfldb
(7 rows)
I saw that message in my prompt. Since then I have been lost..
If pip is installed, then follow the instructions here: https://github.com/BurntSushi/nfldb/wiki/Windows-Install
These look like decent instructions for installing pip: https://pip.pypa.io/en/latest/installing.html
@ochawkeye Windows is really annoying. Do you know of any way to bundle everything up into one executable?
I am sorry, but I have been on those websites for the past 4 hours. I thought I followed the instructions correctly...
Thinks went askew for me on step 12 of the windows install page you linked
You aren't really on step 12 though because nfldb just isn't properly installed.
It seems like you got the database setup, which is great and usually the most difficult part.
I'm not sure how else I can help you with the detail you've given so far. If you start over, I'd suggest keeping a more detailed record of the steps you went through and what exactly went wrong.
I know it's frustrating, but the Python experience on Windows is unfortunately pretty grim.
No worries.
I will start over. Uninstall everything I installed yesterday. Keep notes through the reinstall and follow ochawkeye's window's installation step by step. When I resurface I will let you know how it went and where I stand..
Thanks for yall's help!
On Tue, Jul 29, 2014 at 10:44 PM, Andrew Gallant notifications@github.com wrote:
You aren't really on step 12 though because nfldb just isn't properly installed.
It looms like you got the database setup, which is great and usually the most difficult part.
I'm not sure how else I can help you with the detail you've given so far. If you start over, I'd suggest keeping a more detailed record of the steps you went through and what exactly went wrong.
I know it's frustrating, but the Python experience on Windows is unfortunately pretty grim.
— Reply to this email directly or view it on GitHub https://github.com/BurntSushi/nfldb/issues/33#issuecomment-50570534.
Apologies for offering to help and then promptly falling asleep - ah, the life of someone with a ~2 year old.
Nuking it and starting over is an extreme step and I'm pretty sure we could get you going with what you have. But my schedule is kind of booked this morning for the next 6 hours or so. If you do start over and arrive at the same problem, we can have a TeamViewer session for me to review your environment.
@ochawkeye is awesome. :D
HA! 2 kids under 3.5 and a 7 month pregnant wife here.
All 3 girls.
I am currently nuking it, but I will be in touch again later today. If I am still in trouble we can do a teamview.
Thanks man!
On Wed, Jul 30, 2014 at 6:59 AM, Andrew Gallant notifications@github.com wrote:
@ochawkeye https://github.com/ochawkeye is awesome. :D
— Reply to this email directly or view it on GitHub https://github.com/BurntSushi/nfldb/issues/33#issuecomment-50605257.
A couple of things I would be interested in reviewing:
Do the following commands from a command prompt do the same thing for you?
C:\Users\Ben>c:\Python27\python.exe
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\Ben>python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
Same question for pip:
C:\Users\Ben>c:\Python27\Scripts\pip.exe install
You must give at least one requirement to install (see "pip help install")
C:\Users\Ben>pip install
You must give at least one requirement to install (see "pip help install")
What version of Python are you running? (From my example above you can see I have Python 2.7.6 32 bit)
I’m also a novice and struggled a bit. But I found that installing with pip to be key. Take a look at both install instructions, not just the one for windows.
Installing the nfldb Python module
If you've made it this far, congratulations—the hard part is over! The nfldb Python module should be installed through pip from PyPI:
pip2 install nfldb
It will automatically install dependencies for you (which include nflgame, psycopg2, pytz and enum34).
Also I reverted to Ochawkeye’s tutoring here,
issue BurntSushi/nflgame#29
Good luck.
@teamfball thank you, I will take a look.
@ochawkeye, when I get to that point in my reinstalls I will see if those commands works.
Before I do anything else though.....
Do I need nflgame up and running in order to have nfldb up and running?
On Wed, Jul 30, 2014 at 7:22 AM, ochawkeye notifications@github.com wrote:
BurntSushi/nflgame#29 https://github.com/BurntSushi/nflgame/issues/29
— Reply to this email directly or view it on GitHub https://github.com/BurntSushi/nfldb/issues/33#issuecomment-50607092.
@roodhouse If you're using pip
to install nfldb
(you should be), then nflgame
will get installed automatically. In theory, you shouldn't even need to know that nflgame
is on your system.
All 3 girls.
@roodhouse Man I feel for you. Frozen has already been played twice beginning to end here and it's not even 10am. And I only have one girl. 2 month old son can't grow up fast enough for me :family:
frozen. do you want to build a snowman? ride your bike around the hall?
I am done with the windows install page. I am going to copy my notes below. First I will attach them to this email string to see if that works to cut down on clutter.
As you can see I have the same result..
On Wed, Jul 30, 2014 at 9:54 AM, ochawkeye notifications@github.com wrote:
All 3 girls. @roodhouse https://github.com/roodhouse Man I feel for you. Frozen has already been played twice beginning to end here and it's not even 10am. And I only have one girl. 2 month old son can't grow up fast enough for me [image: :family:]
— Reply to this email directly or view it on GitHub https://github.com/BurntSushi/nfldb/issues/33#issuecomment-50625817.
- Uninstall Python 2.7.8
- Uninstall Python 2.7 pscopg2-2.5.3
- Uninstall Python 2.7 pip-1.5.6
- Uninstall PostgreSQL 9.3 (x86)
- note: The Data directory (c:\program files(x86)\postgresql\9.3\data) has not been removed
Windows Install not switching b/w the main install page and the windows install page
#
user = nfldb password = xxxxxx#....
all attaching did was paste my notes here.. sorry about that..
I am waiting instruction now..
Looks like you've installed pip
but have not installed nfldb
. Try this from a command prompt:
c:\python27\scripts\pip.exe install nfldb
after doing that here is my next error..
c:\Python27\Scripts>pip.exe install nfldb
Traceback (most recent call last):
File "c:\Python27\Scripts\pip-script.py", line 9, in
On Wed, Jul 30, 2014 at 10:37 AM, ochawkeye notifications@github.com wrote:
Looks like you've installed pip but have not installed nfldb. Try this from a command prompt:
c:\python27\scripts\pip.exe install nfldb
— Reply to this email directly or view it on GitHub https://github.com/BurntSushi/nfldb/issues/33#issuecomment-50632502.
Ho - lee crap :( Scary!
You installed the 32-bit version of pip
. Do you have the 32-bit version of Python?
Can confirm from c:\python27\python.exe
c:\Python27>python.exe Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win 32
yet i am running a 64 bit ver of windows......?
yet i am running a 64 bit ver of windows......?
That's just fine. So am I. There are some packages I use that are only stable in 32-bit. I'm going to upgrade from 2.7.6 to 2.7.8 to see if it breaks anything.
I'm happy to remote into your system to see if I can't identify the problem as well. If you want me to do that you can use that TeamViewer link I sent you and send the credentials directly to me: benjamin.j.schroeder@gmail.com
let me know if anything breaks for you with 2.7.8 and then if not we can remote... cool?
Nope, no ill effects there...
C:\Users\Ben>python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
C:\Users\Ben>pip uninstall nfldb
Uninstalling nfldb:
d:\python27\lib\site-packages\nfldb-0.2.0-py2.7.egg-info
d:\python27\lib\site-packages\nfldb\__init__.py
d:\python27\lib\site-packages\nfldb\__init__.pyc
d:\python27\lib\site-packages\nfldb\category.py
d:\python27\lib\site-packages\nfldb\category.pyc
d:\python27\lib\site-packages\nfldb\db.py
d:\python27\lib\site-packages\nfldb\db.pyc
d:\python27\lib\site-packages\nfldb\query.py
d:\python27\lib\site-packages\nfldb\query.pyc
d:\python27\lib\site-packages\nfldb\sql.py
d:\python27\lib\site-packages\nfldb\sql.pyc
d:\python27\lib\site-packages\nfldb\team.py
d:\python27\lib\site-packages\nfldb\team.pyc
d:\python27\lib\site-packages\nfldb\types.py
d:\python27\lib\site-packages\nfldb\types.pyc
d:\python27\lib\site-packages\nfldb\version.py
d:\python27\lib\site-packages\nfldb\version.pyc
d:\python27\scripts\nfldb-update
d:\python27\share\doc\nfldb\doc\index.html
d:\python27\share\doc\nfldb\doc\nfldb-condensed.pdf
d:\python27\share\doc\nfldb\doc\nfldb-condensed.png
d:\python27\share\doc\nfldb\doc\nfldb-short.pdf
d:\python27\share\doc\nfldb\doc\nfldb-short.png
d:\python27\share\doc\nfldb\doc\nfldb.pdf
d:\python27\share\doc\nfldb\doc\nfldb.png
d:\python27\share\doc\nfldb\longdesc.rst
d:\python27\share\doc\nfldb\readme.md
d:\python27\share\doc\nfldb\unlicense
d:\python27\share\nfldb\config.ini.sample
Proceed (y/n)? y
Successfully uninstalled nfldb
C:\Users\Ben>pip install nfldb
Downloading/unpacking nfldb
Running setup.py (path:c:\users\ben\appdata\local\temp\pip_build_Ben\nfldb\set
up.py) egg_info for package nfldb
Requirement already satisfied (use --upgrade to upgrade): nflgame>=1.2.2 in d:\p
ython27\lib\site-packages (from nfldb)
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in d:\python2
7\lib\site-packages (from nfldb)
Requirement already satisfied (use --upgrade to upgrade): enum34 in d:\python27\
lib\site-packages (from nfldb)
Requirement already satisfied (use --upgrade to upgrade): pytz in d:\python27\li
b\site-packages (from nfldb)
Requirement already satisfied (use --upgrade to upgrade): httplib2 in d:\python2
7\lib\site-packages (from nflgame>=1.2.2->nfldb)
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in d:\p
ython27\lib\site-packages (from nflgame>=1.2.2->nfldb)
Installing collected packages: nfldb
Running setup.py install for nfldb
Successfully installed nfldb
Cleaning up...
I don't think we have a problem with nfldb
(yet). We need to get past this pip
issue; Does pip freeze
work for you? (You will need the full path if you haven't setup your ENVIRONMENT VARIABLES
) c:\python27\scripts\pip.exe freeze
C:\Users\Ben>pip freeze
beautifulsoup4==4.3.2
enum34==1.0
httplib2==0.9
nfldb==0.2.0
nflgame==1.2.6
psycopg2==2.5.3
pytz==2014.4
requests==2.3.0
selenium==2.42.1
virtualenv==1.11.6
no here is the result...
c:\Python27\Scripts>pip.exe freeze
Traceback (most recent call last):
File "c:\Python27\Scripts\pip-script.py", line 9, in
One thing to note is that I did not follow any steps on the regular nfldb page. Therefore the step on that page that begins with:
Installing the nfldb Python module
If you've made it this far, congratulations—the hard part is over! The nfldb Python module should be installed through pip from PyPI:
has not been done.
That's the exact step we're trying to do (which equates to step 3 in the Windows installation page). But with a non-functioning pip
we're not able to do it...
Could you uninstall only pip
and then try reinstalling it using this method?
You should only have to run the first command, python get-pip.py
(note that you have to download get-pip.py
from the link I gave you. After you run that, could you try pip install nfldb
again?
I'm not seeing anything helpful on the Internet about your weird _vendor
import error.
@ochawkeye Do you have an updated pip? 1.5.6
I think is the latest.
Are you positive you installed pip‑1.5.6.win32‑py2.7.exe
? Mine came with a _vendor
subfolder.
You should be able to confirm the file name you downloaded in your Downloads
folder.
So at this point installing the nfldb Python module is redundant?
Where should I be able to locate these?
It will automatically install dependencies for you (which include nflgame, psycopg2, pytz and enum34).
So at this point installing the nfldb Python module is redundant?
Not at all - you haven't been able to successfully install the python module because the install method pip
is failing. Once you get pip to work, installing nfldb will be a breeze.
So at this point installing the nfldb Python module is redundant?
No. You can't install nfldb
without a functioning pip
.
Let me explain it to you.
Python is the programming language that nfldb
was written in. This is required in order to run Python programs that use nfldb
.
pip
is a tool, written in Python, that installs other Python libraries. One such library is nfldb
. Without pip
, you cannot easily install nfldb
. Without Python, you cannot have pip
.
Therefore, at this point in time, since your pip
is not working, that must be fixed before we can move on to anything else.
Once it is working, you should be able to install nfldb
with pip install nfldb
. This will also install pytz, nflgame, etc.
@BurntSushi got it
@ochawkeye i did install the correct pip. and i too have a _vendor folder
going to uninstall & reinstall pip now..
i want to make sure i am installing pip correctly from the link above...
i copy and paste all this code into a file with ext .py?
where does the code begin and end? with the 3 " marks? or with ZIPFILE? ends with the final 3 " marks? or ends with the last line of text "main ()"?
@roodhouse Right click on the link and click "Save link as..." or "Save target as..."
Avoid copy and pasting. That can introduce errors.
@BurntSushi right click? how?
Uh...
Here: https://bootstrap.pypa.io/get-pip.py <-- Right click on that link. There should be an option to "Save target as..." (Or "Save link as...")
sorry.. bad joke.
I downloaded it as get-pip.py ... now i need to run it in cmd prompt with c:\python27\scripts>python get-pip.py ?
First, thank you for putting this together. I am excited about it.
However, as stated I am a newb and I've found myself lost.
I made it through the install instructions for Windows however each time a try to run either the top-ten-qbs.py or nfldb-update I get an error that says: "ImportError: No module named pytz"
Not sure what I have done wrong or missed. Could you help me troubleshoot.
Thank you! -John