psygcop2 not found
flycast1810
HOBBYOP

2 months ago

I've been trying to build and deploy the front-end of my application. DB implementation seemed to go well. But I noticed in the logs, that the python .venv is located within my app folder. On my local and in github, where I keep my sourcee", the .venv is a peer to the app folder. When building the container by Railway, it's green at first and then crashes because psygcop2 cannot be found. That's the PSQL driver. And I think it's because of where Railway placed my .venv. Plus I didn't see Railway activate the .venv, and I know psygcop2 is not in the default implementation of Postgres.

Any idea how I can resolve this problem? This is my first day with Railway, and I'm trying to find out how I can change the build and deploy script so that it works correctly as it does on my laptop.

Any thoughts would be greatly appreciated.

$10 Bounty

1 Replies

douefranck
FREE

2 months ago

check your requirements.txt file and if you have psycopg2 listed, change it to psycopg2-binary instead. this is the standard fix for railway because psycopg2 needs to compile from source which requires pg_config that railway doesnt have by default, but psycopg2-binary comes precompiled and works without any build tools. if you already have psycopg2-binary then the issue is something else and you should share your actual error logs from railway

doue


Loading...