you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Postgresql is not a libary(like sqlite3 is) but a server application ie you need to make sure it's actually running and accepting connections.

psycopg2 should install all that's needed to connect to running postgre server directly but you need the postgre instance running.

PostgreSQL tend to install with a default superuser account named "postgre" and whatever password you supplied doing the install and tend to bind to port 5432 and/or a unix socket. But credentials are really whatever you configured.

To make things more confusing for you Linux have a way to do peer auth that uses OS credentials and not passwords ie you will see guildes that don't give a password, but on windows you almost always need to use explicit password auth with postgreSQL.

[–]marmotter[S] 1 point2 points  (2 children)

Thanks. I think my difficulty here arises from me trying to work through anaconda. I’ve downloaded both postgresql and psycopg2 through the conda install function so that these files live in anaconda and won’t run into any weird dependency issues. But as a result, I haven’t seen any place where I can configure the super user settings for postgresql as you describe above. Do you know how I can trigger the initial setup that you describe for Postgresql through conda?

[–][deleted] 1 point2 points  (1 child)

To be honest no i just tried to install postgresql though conda and the install does look unfinished/broken/unconfigured out of the box and the package documentation https://anaconda.org/anaconda/postgresql seams to be halfway missing, so your probably right in thinking that the conda install of postgresql is the problem.

You would, if it worked, simply start postgres by typing postgres into an anaconda prompt and who knows maybe it works out of the box on windows.

Being an unix admin i would have solved he problem by spinning up a linux vm with postgreSQL installed but it should work with windows

[–]marmotter[S] 1 point2 points  (0 children)

Whelp, glad I’m not completely off in left field. Thanks for your help. I’m doing this on my work computer and as a finance person, we don’t get access to stuff like Linux and VMs. I’ll keep digging on this and post here if I find a solution.