Skip to content
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

Unable to run nfldb-update #88

Open
pherp opened this issue Jul 13, 2015 · 9 comments
Open

Unable to run nfldb-update #88

pherp opened this issue Jul 13, 2015 · 9 comments

Comments

@pherp
Copy link

pherp commented Jul 13, 2015

Hi,

Great project. I've been able to install and load the nfldb database based on the .zip file but I am not able to run either the test top-ten-qbs.py file or the nfldb-update script.

I'm running Windows 8.1 64-bit and am wondering if that is the issue.

When I run nfldb-update, i get the following error:
C:\Python27>Scripts\nfldb-update
'Scripts\nfldb-update' is not recognized as an internal or external command,
operable program or batch file.

When I run the top-ten-qbs.py file, I get the following error:

C:\Python27>share\nfldb\toptenqbs.py
Traceback (most recent call last):
File "C:\Python27\share\nfldb\toptenqbs.py", line 1, in
import nfldb
File "C:\Python27\lib\site-packages\nfldb__init__.py", line 61, in
from nfldb.db import pdoc as db_pdoc
File "C:\Python27\lib\site-packages\nfldb\db.py", line 9, in
import psycopg2
File "C:\Python27\lib\site-packages\psycopg2__init__.py", line 50, in <module

from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID

ImportError: DLL load failed: The specified module could not be found.

Any thoughts?

@ochawkeye
Copy link
Contributor

C:\Python27>Scripts\nfldb-update

Try python scripts\nfdb-update from that location. Despite the python path being included in the shebang line, I think Windows just won't attempt to hunt down the executable for a file without a file extension.
image

C:\Python27>share\nfldb\toptenqbs.py

As for that one, I know I had trouble installing psycopg in the Windows world. Did you follow this guide for installation and you obtained psycopg from here?

@hardyaf
Copy link

hardyaf commented Sep 24, 2015

Hi, I am pretty proficient in MySQL, and am assuming the query GUI for postgre will be an easy transfer for me, but I am completely new to Python. I am also having the issue from above. I believe my issue is psycopg is not installed. I googled how to install the .whl from your link (I am on windows 10) and it said I need to use easy_setup. However, when I try to install easy_setup, I get another error message. Any chance someone here who doesn't suck at Python can help?

To answer your above response, I get the issue no matter where I run that command from. I verified my python install is good, and edited my system variables. I am pretty sure my issue is installing the .egg file on a windows machine.

easy_setup_error

Otherwise I found the two guides, especially the Windows one very helpful. This has been excellent work and I very much appreciate everything you went through writing this up. This is easily one of the best 5 things I have found on the internet, and even if I can't get the sync to work, manually copying you sql files and importing takes ~5 minutes, and opened up so much analysis options.

@ochawkeye
Copy link
Contributor

Back when I wrote that Windows install tutorial, the link to psycopg went to a .exe. All binaries that are hosted over there have converted to these .whl files that might be a little bit less intuitive for a beginner, but are still pretty easy to install.

All you have to do is pip install X:\path\to\your\psycopg2-2.#.#-cp##-none-ARCH.whl replacing the path and file name with your version.

As for easy_install, if you've got pip working properly you probably won't have much need for it, but you already have it as it is part of the standard library (you should see easy_install.exe in your X:\Python27\scripts folder). If you didn't already have pip, you would use easy_install to install pip with easy_install.exe pip. Then you could install the .whl with pip. But since you already have pip working, you don't need to worry about that part at the moment.

EDIT: I think I misspoke re: easy_install being part of the standard library. You could install by downloading ez_setup.py and running it with python X:\path\to\ez_setup.py. But the rest of the answer applies.

@sjr1616
Copy link

sjr1616 commented Oct 9, 2015

I am having the exact same issue as the original post and I can't seem to figure out what the problem is. I have followed the guides, as well as the comments in this post, exactly as they are written. Even went as far as re-installing Windows, but still no luck. Any help would be greatly appreciated.

@BurntSushi
Copy link
Owner

@sjr1616 Can you please post the commands you are trying and their outputs?

@ochawkeye
Copy link
Contributor

Have you tried pip installing the .whl file that can be downloaded from here? Download psycopg2‑2.6.1‑cp27‑none‑win32.whl and then (assuming you have pip properly installed):

pip install X:\path\to\your\psycopg2‑2.6.1‑cp27‑none‑win32.whl

@sjr1616
Copy link

sjr1616 commented Oct 9, 2015

python c:\python27\share\nfldb\top-ten-qbs.py
Traceback (most recent call last):
File "c:\python27\share\nfldb\top-ten-qbs.py", line 1, in
import nfldb
File "C:\Python27\lib\site-packages\nfldb__init__.py", line 61, in
from nfldb.db import pdoc as db_pdoc
File "C:\Python27\lib\site-packages\nfldb\db.py", line 9, in
import psycopg2
File "C:\Python27\lib\site-packages\psycopg2__init__.py", line 50, in
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: DLL load failed: The specified module could not be found.

@BurntSushi This is the error I get and it also is the exact same thing when i try to run the nfldb update command.

@ochawkeye Yes, I have done that as well.

@ochawkeye
Copy link
Contributor

For anyone that has this problem in the future...

No idea what the deal is with the bizarro issue, but it may be due to a broken version 2.6.1 build posted to the link I have included above.

Until (if ever) that gets fixed, you should be able to use this older version 2.5.4 that fixed @sjr1616 's problem.

@hardyaf
Copy link

hardyaf commented Jan 10, 2016

I never did comment back here, but I did want to mention that the older version worked perfectly for me. Thanks so much for the help and all the work you guys put into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants