Skip to content

python-3.6 and psycopg2 (Error: pg_config executable not found.) #45

@vashchukmaksim

Description

@vashchukmaksim

I'm trying to setup an environment with nanobox python engine. If I use python-2.7 and then install a psycopg2 package (pip command within a container or with a requirements.txt) it works ok. But when I switch to python-3.6 I got an error "Error: pg_config executable not found.". This is a well known issue but I can't solve it with a nanobox container. I can't install any dependencies (python3-dev or libpq-dev) since there is none of these in Nanobox pkgsrc and even can't find a path to pg_conf.

Is there any way to use python3 with psycopg2 with nanobox?

My starting config:

run.config:
engine: python
engine.config:
runtime: python-3.6
extra_packages:
- nodejs
cache_dirs:
- client/node_modules
extra_path_dirs:
- client/node_modules/.bin
build_triggers:
- server/requirements.txt
- client/package.json
- client/package-lock.json
extra_steps:
- cd server && pip install -r requirements.txt
- cd client && npm install
fs_watch: true

data.postgresql:
image: nanobox/postgresql
config:
version: 9.6
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions