8

I'm going through the Heroku "Getting Started with Python" flow. It's my first time doing so, and stuck on following this set of instructions.

When I enter

$ pip install -r requirements.txt

I get the error:

-bash: pip: command not found

What I'm trying to do is install postgresql because the site says

"Postgres must be properly installed in order for this step to work properly."

The error with Postgres is that whenever i try to do anything, for example:

$ psql

or

$ psql -h localhost

it returns this error:

psql: error: FATAL:  role "myname" does not exist

when I try to do

$ sudo -u postgres createuser myname

i receive the error

sudo: unknown user: postgres
sudo: error initializing audit plugin sudoers_audit

...

to even get to this point, I had to manually update my private/etc/host file to put generic MacOS localhost information back into that document (since work stuff had me messing with things years ago, rip)... so I assume this issue is similar, but I am stumped since apparently even sudo commands are not allowing me to create a user role in order to continue the Postgres install / setup. I have reinstalled and deleted the postgreSQL apps and data, restarted my computer, cleared the DNS cache, but these haven't helped me become unblocked. Any ideas or help would be appreciated, thank you.

For context, I'm on MacOS Big Sur 11.4

SixSwords
  • 111
  • 1
  • 1
  • 8

1 Answers1

3

I have resolved the 'pip' issue from the beginning of the question in order to move on through the Heroku python experience. As it turns out, pip install -r requirements.txt alone is no longer sufficient to trigger the declaration of dependencies. What did work is when I typed in pip3 install -r requirements.txt , and the entire postgres troubleshooting experience need not have held me back. However, the question may be relevant to others or for myself sooner or later, so will leave it up.

SixSwords
  • 111
  • 1
  • 1
  • 8