Back

[SOLVED] Fail to build deployment

  • 0
  • Web
itsRohit
12 Jun, 2023, 10:25

build is getting fail as I am trying to install opencv-python. Is there any way to solve this error?

TL;DR
Title: [SOLVED] Fail to build deployment Solution: The issue is that opencv-python requires numpy, which does not work in Appwrite Functions. However, Appwrite plans to introduce a specific runtime with numpy support in the future. In the meantime, you can update the runtime version in your `appwrite.json` file. If you are using Appwrite Cloud, you can update the runtime version in the `.env` file and restart the Docker container using `docker compose restart`. Additionally, make sure you have added all the required packages in the `requirement.txt` file.
Binyamin
12 Jun, 2023, 12:43

Have you added all the packages inside requirement.txt file?

Guille
12 Jun, 2023, 13:03

Seems like the version of python you're using isn't compatible

Open your .env file and update _APP_FUNCTIONS_RUNTIMES

You can use python-3.8 or python-3.9

After update it, run docker compose restart where your docker-compose.yml file is located

itsRohit
12 Jun, 2023, 13:44

Can I do it in appwrite?

Guille
12 Jun, 2023, 13:52

Are you using appwrite cloud?

kunxl.gg
12 Jun, 2023, 13:54

yes

kunxl.gg
12 Jun, 2023, 13:54

we are using appwrite cloud for this

Guille
12 Jun, 2023, 13:55

are you using CLI?

kunxl.gg
12 Jun, 2023, 13:55

cli for deploying the function?

Guille
12 Jun, 2023, 13:55

yes

kunxl.gg
12 Jun, 2023, 13:55

we did use the cli

Guille
12 Jun, 2023, 13:59

The first time when you run appwrite init function you can select your runtime, as you already create your function, try updating appwrite.json to change the runtime

kunxl.gg
12 Jun, 2023, 15:29

our python runtime is 3.9

kunxl.gg
12 Jun, 2023, 15:30

this is what confused me coz. I remeber that you could only choose 3.9 as a runtime version for python

Drake
12 Jun, 2023, 16:15

opencv-python requires numpy which doesn't work in Appwrite Functions. You might want to 👍🏼 this issue: https://github.com/appwrite/appwrite/issues/1037

we plan to introduce a specifc runtime that has support for numpy in the future

itsRohit
12 Jun, 2023, 16:22

Okkey, that's the function is not able to build

kunxl.gg
12 Jun, 2023, 16:26

ohh thanks for your support.

Guille
14 Jun, 2023, 14:25

[SOLVED] Fail to build deployment

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more