Replit fails to install python postgres package from package manager or if written in requirements.txt. How can i fix this to enable link to neon PG db?
move to Nix modules to prevent this bug
I think OP wanted to use a separate db, and his/her problem was that python
postgres isn’t installing. try running
pip install yourPackageName in the shell and replace yourPackageName with the package you want to install.
Also I have a few things to say:
- DO NOT expose your database password in your code
- You don’t need the sqlite file seeing that you’re using PG with Neon.
Will the postgres module even install? Does Replit even allow it sonce they have their own? It would defeat the whole purpose of the paid Postgres then…
I’m trying to use the neon built-in db actually!
I tried pip install but that also failed to intsall the package.
Yes removing sqlite but thank you for flagging! and no idea how not to expose the db password…
To not expose the db password, use replit’s Secrets tool.
Open a Secrets tab in the editor from Tools or from a new tab. Secrets are environment variables that no one else can see and aren’t included in forks (which includes the cover page).
You can access it like this:
Also, what is the pip error?
yeah, your venv is broken, so