-
Notifications
You must be signed in to change notification settings - Fork 263
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
nfldb Mac installation #215
Comments
Systemd is a Linux init system. It wouldn't be available on a Mac.
…On Dec 3, 2016 09:09, "Charlie Minton" ***@***.***> wrote:
Has anyone installed nfldb on the mac? I have installed postgres and
pgAdmin. I am at the point where I create the actual postgresql db. The
following command is not recognized:
systemd-tmpfiles --create postgresql.conf
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#215>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAb34kinENehFLB07J0uKU1g5wVMN_GVks5rEXf-gaJpZM4LDTSY>
.
|
Thanks Andrew. I am trying to set up nfldb, so I can move to it. I am excellent at application development, but very out of touch with systems, so not so good at this type of set up. Does anyone know what steps I take from this point to be able to use nfldb on a Mac? |
It sounds like you need to find a generic tutorial for setting up postgres
on a mac. You'll probably also want to look up how to install the psycopg2
python module for mac.
…On Dec 3, 2016 10:17, "Charlie Minton" ***@***.***> wrote:
Thanks Andrew. I am trying to set up nfldb, so I can move to it. I am
excellent at application development, but very out of touch with systems,
so not so good at this type of set up. Does anyone know what steps I take
from this point to be able to use nfldb on a Mac?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#215 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAb34qvK-mrvD3q1cLVT9eEE1tp2D8Eeks5rEYgggaJpZM4LDTSY>
.
|
@AndrewRook thank you. When I get to postgres -D /usr/local/var/postgres It just seems to hang there. Is it waiting for something from me? |
Yeah, that's normal - that command is running the database in the foreground (the If you decide you're happy running postgres in the foreground (ctrl-c should kill it if you want to try the background command) you'll need to open up a new terminal window (command+n) or tab (command+t) and continue there. |
I figured it was looping. I should have thought of opening another terminal window. That was dumb of me. |
Any idea what this error is? I am superuser, so do not think it is permissioning... Exception: |
I got that error running pip2 install nfldb |
Looks like this is a security feature in El Cap. The simple answer (as recommended in that SO question) is to use a virtual environment. The SO answer recommends |
Then I use a virtual environment to continue the installation or every time I use nfldb? |
Both, basically. You'll install nfldb (and any other packages you need) into the virtual environment, and then whenever you want to use nfldb you'll activate the virtual environment and work from there. Personally I use a new virtual environment for every project - that way you never have to worry about dependencies conflicting between projects. One caveat, however - the nfldb database will be visible across virtual environments, which is actually kind of nice - if you use nfldb in multiple projects you shouldn't have to remake the database for each one. |
Hey all, getting stuck at this part of this guide: |
I can't get the NFL db to work either. However, I have a lot of code to pull stats using the API.
Charlie
… On Aug 18, 2017, at 9:54 PM, Arrashg ***@***.***> wrote:
Ok and then I got to here
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@cminton can you help me do that? or are there instructions anywhere for how to do that? |
Happy to. I am on a trip, but back Sunday. What data are you looking for?
… On Aug 18, 2017, at 9:57 PM, Arrashg ***@***.***> wrote:
@cminton can you help me do that? or are there instructions anywhere for how to do that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@cminton Not sure 100% what the etiquette is so I won't post links but I have a site full of NFL teams, schedule, games played and player profiles I need to populate with standard data such as catches, yards, etc after every game. What I would also like is targets, red zone targets, yards after contact, aDOT on top of that. Goal is to build a daily fantasy stacking tool and eventually a game center that updates. |
@Arrashg I have Python code to pull all of that data. What is "aDOT"?
Others who use nflgame say that the db is a much better way to go, so it may be worth your time to get that to work. That said, happy to give you my code.
Charlie
… On Aug 18, 2017, at 10:23 PM, Arrashg ***@***.***> wrote:
@cminton Not sure 100% what the etiquette is so I won't post links but I have a site full of NFL teams, schedule, games played and player profiles I need to populate with standard data such as catches, yards, etc after every game.
What I would also like is targets, red zone targets, yards after contact, aDOT on top of that. Goal is to build a daily fantasy stacking tool and eventually a game center that updates.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@cminton Average Depth of Target for receivers. Ok thank you. I'll utilize your code and also keep trying to get the DB up and running at the same time. |
@Arrashg,
Just landed. Give me a few hours. I have the code for that.
Charlie
… On Aug 20, 2017, at 5:47 PM, Arrashg ***@***.***> wrote:
@cminton Average Depth of Target for receivers.
Ok thank you. I'll utilize your code and also keep trying to get the DB up and running at the same time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hey @Arrashg, going back to this comment, is your username "home"? If that's the case, it looks like you may have missed the step directly after starting up postgres for the first time: $ createdb `whoami` That will create a database based on your username, which should solve the does not exist error you got. |
@AndrewRook Thanks a lot. Made a lot of progress and now I am at the final step of which I am confused about regarding "default configuration directory. I moved it to "Application Support" but not sure this is the correct place. I am an OSX newbie. When I added my password and saved the file, I tried the last few instructions but ended up with this: This is the section I am confused about: |
Download the default config.ini.sample file.
https://github.com/BurntSushi/nfldb/blob/master/config.ini.sample
Edit your details. Save to one of those paths that it stated that it is
looking for the config file at such as
/Users/home/.config/nfldb/config.ini
…On Mon, Aug 21, 2017 at 1:14 AM, Arash Ghaemi ***@***.***> wrote:
@AndrewRook <https://github.com/andrewrook> Thanks a lot. Made a lot of
progress and now I am at the final step of which I am confused about
regarding "default configuration directory. I moved it to "Application
Support" but not sure this is the correct place. I am an OSX newbie. When I
added my password and saved the file, I tried the last few instructions but
ended up with this:
[image: screen shot 2017-08-20 at 10 11 12 pm]
<https://user-images.githubusercontent.com/20796673/29504473-d4af327c-85f4-11e7-9196-80f64f5fea55.png>
This is the section I am confused about:
[image: screen shot 2017-08-20 at 10 12 02 pm]
<https://user-images.githubusercontent.com/20796673/29504478-ddd65f2e-85f4-11e7-88f3-e8dc4b90c6fb.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#215 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACCil7wCzRrSgY30ZrX8WiQ8FTTFVLG-ks5saRImgaJpZM4LDTSY>
.
|
I'm starting to think that nfldb was saved to the wrong folder. When I try and run it, it says no module named nfldb. I'm still unsure of which .config file to save it to. I tried moving it to .config and then to run it and I get the same problem. I have attached images of where I currently tried to add it. I'm so close thanks to everyone's help. |
@Arrashg if you're getting an |
@AndrewRook I followed these steps I also tried what was suggested and the list of relations show up fine After that, I moved on to these I did not notice any errors during install and did not run into anymore snags until the .config section. I'm open to uninstalling and going back thru the steps again but not sure if that is the best solution. Something I noticed is the file path it tried to follow when I ran nfldb-update, doesn't exist when I try and follow it in finder. After "Python.framework", there should be Versions/2.7/share/nfldb/ where I can add the .config file. |
None of the steps in the directions on http:https://nflwin.readthedocs.io explicitly has you install the python Try |
On the mac I had a better time with
sudo pip install --user nfldb
…On Tue, Aug 22, 2017 at 9:16 AM, ochawkeye ***@***.***> wrote:
None of the steps in the directions on http:https://nflwin.readthedocs.io
explicitly has you install the python nfldb library. Looks to me like
you've got the Postgres database imported, but not the Python nfldb
package.
Try pip install nfldb.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#215 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACCil78aHk0J3MuUtoS2nXQetoDUVbuTks5satSogaJpZM4LDTSY>
.
|
@ochawkeye Getting close here. Now when I run the command "import nfldb" it says command not found. When I run "nfldb-update" it updates the db! |
In order to use the nfldb Python package (which provides the API wrapper around the postgres database) you have to be running python, either as a script (e.g.
|
@AndrewRook When I start python and >>> import nfldb, I get an ImportError but nfldb is located here so not sure why that is |
that probably means that You can see what paths your install is looking in by doing the following:
For more info on how python finds packages see here. If this does turn out to be the problem you can either monkey around with |
Has anyone installed nfldb on the mac? I have installed postgres and pgAdmin. I am at the point where I create the actual postgresql db. The following command is not recognized:
systemd-tmpfiles --create postgresql.conf
The text was updated successfully, but these errors were encountered: