0

I am using the package pytest-server-fixtures for tests using a PostGres database on Windows. The problem arises in the package when trying to access pg_config.exe:

subprocess.check_output(["pg_config", "--bindir"])

The error given:

The system cannot find the file specified

I know this is a relatively common error, but no other answers addressed the issue.

Things I have tried:
• pg_config.exe exists in C:\Program Files\PostgreSQL\11\bin, and this has been added to my PATH.
• Running pg_config --bindir outside of Python returns a path.
• Running check_output with shell=True is unsuccessful.
• Running check_output with shutil.which('pg_config') is unsuccessful.
• psycopg2 was installed AFTER PostGres was installed.
• Tried with psycopg2-binary unsuccessfully.
• These tests were written on MacOS, and are successfully being run there and on Linux.
• pg_config.exe has read and execute permissions.

Any help is appreciated! Thanks!

thatdanghill
  • 125
  • 5

0 Answers0