Skip to content
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

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

Open
vashchukmaksim opened this issue May 14, 2018 · 2 comments
Open

Comments

@vashchukmaksim
Copy link

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
`

@fsecada01
Copy link

fsecada01 commented Sep 10, 2018

in extra_packages, declare pkgin as a new dependency.

After that, write nanobox run in your command line, and write in pkgin install postgresql93. Then write `pkgin export > pkgin_dependencies.txt' or whatever extension is your notepad application. Then declare in extra_steps:

'pkgin im pkgin_dependencies.txt -y'

That should resolve your issue, hopefully.

@danhunsaker
Copy link

Note that pkgin is already installed, since it's the package manager installing extra_packages in the first place, so you can skip adding it to your configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants