prisma-client-py
prisma-client-py copied to clipboard
Generator cannot start
Bug description
When I run prisma generate
, I see the error:
Environment variables loaded from .env
Prisma schema loaded from schema.prisma
Error: Generator at prisma-client-py could not start:
/bin/sh: prisma-client-py: command not found
Expected behavior
My requirements.txt includes prisma
and pip install -U prisma
says requirement already satisfied. So I'm puzzled! I'm also going to hit the Vercel bug but one step at a time ;)
Prisma information
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-py"
interface = "asyncio"
recursive_type_depth = 5
}
Environment & setup
- OS: Mac OS
- Database: PostgreSQL
- Python version: Python 3.7.15
- Prisma version:
prisma : 4.10.0
prisma client python : 0.8.1a
platform : darwin
expected engine version : ca7fcef713137fa11029d519a9780db130cca91d
install path : /opt/anaconda3/lib/python3.7/site-packages/prisma
installed extras : []
@coyotespike I suspect this is an issue with the anaconda setup somehow.
Under the hood, setting provider
to prisma-client-py
just results in the Prisma CLI calling the prisma-client-py
script that should be installed when you install the prisma
package. To immediately unblock yourself you may be able to change prisma-client-py
to python -m prisma
as they are equivalent.
As you're running the prisma
command yourself its very strange that it isn't able to resolve the prisma-client-py
script...
If you run prisma-client-py
in your terminal does it resolve the script correctly?
python -m prisma
I experience the same error while setting up an debian vm on gcloud
did not experience this issue while developing locally on arm64 mac
setting the generator to python3 -m prisma
did resolve the issue.
@ProfXponent have this same issue, so you changed your client to:
generator client { provider = "python3 -m prisma" recursive_type_depth = "5" interface = "sync" }
?? im still getting: /usr/bin/python3: No module named prisma error
@ProfXponent have this same issue, so you changed your client to:
generator client { provider = "python3 -m prisma" recursive_type_depth = "5" interface = "sync" }
?? im still getting: /usr/bin/python3: No module named prisma error
could be that you installed prisma wrong or your pip
installer is not linked to python3