Skip to content
Back

Function running in cloud but not locally

  • 0
  • Functions
  • Cloud
whitewhiskers
14 Sep, 2025, 10:18

Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwrite cloud but when trying locally (using appwrite run functions command), the build fails with the message "RuntimeError: Unsupported compiler -- at least C++11 support is needed!". The cli is pulling openruntime v4-3.12 for python. Currently I can work by deploying to production, but ideally I'd like to test everything locally before pushing to production of course.

TL;DR
Function using Python 3.12 on Appwrite cloud runs successfully, but fails locally due to unsupported compiler issue with 'hnswlib' library. One solution is to add "apk add build-base" to the "command" section in appwrite.json, but it increases build time. The issue stems from the C++11 support requirement.
whitewhiskers
14 Sep, 2025, 10:33

Additionally, I can also resolve this by appending "apk add build-base" to the "command" section in appwrite.json but this adds an extra step which increases build time.

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