Back

Custom Runtime && Problem Building Python 3.9

  • 0
  • Functions
  • Cloud
ZachHandley
10 Oct, 2023, 01:24

Hey,

So I see in the starter templates that I can use different Python versions or what not, but how do I actually specify this? I can’t find it anywhere in the docs, and when I tried to deploy a python-3.11 function it errored on me. Additionally, when changing that 3.11 back to 3.9, it errors on build for a reason I do not understand

TypeScript
Installing collected packages: pyxb, urllib3, lxml, idna, charset-normalizer, certifi, requests, authorizenet, appwrite
  Running setup.py install for pyxb: started
  Running setup.py install for pyxb: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Running setup.py install for pyxb did not run successfully.
  │ exit code: -9
  ╰─> [383 lines of output]
      Found bundle in /tmp/pip-install-ebcfy4wo/pyxb_9e14f3fb3495400ba3fc1cd6c4bdf977/pyxb/bundles/common
      bunch of shit in the middle
      copying build/lib/pyxb/utils/activestate.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/domutils.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/templates.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/unicode_data.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/saxdom.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/fac.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/six.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/saxutils.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/utils/utility.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/utils
      copying build/lib/pyxb/exceptions_.py -> /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/datatypes.py to datatypes.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/__init__.py to __init__.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/content.py to content.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/basis.py to basis.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/facets.py to facets.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/saxer.py to saxer.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/xml_.py to xml_.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/binding/generate.py to generate.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/__init__.py to __init__.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/bundles/common/__init__.py to __init__.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/bundles/common/raw/__init__.py to __init__.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/bundles/common/raw/xlink.py to xlink.cpython-39.pyc
      byte-compiling /usr/local/build/runtime-env/lib/python3.9/site-packages/pyxb/bundles/common/raw/xhtml1.py to xhtml1.cpython-39.pyc
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyxb

So yeah any help would be appreciated

TL;DR
The user is experiencing an error while building a Python 3.9 function and trying to use different Python versions. The error seems to indicate a memory problem. The user also mentions that they are unable to see runtimes other than the default ones when using the CLI and asks how to enable them. Solution: To enable runtimes other than the default ones, the user needs to use the UI instead of the CLI. Additionally, the error code -9 may indicate low memory. The user should check the logs for an explanation as to why the package couldn't be installed.
Drake
10 Oct, 2023, 01:36

Uh...you should be able to see runtimes in the drop-down when creating a function

Drake
10 Oct, 2023, 01:38

Somewhere in these logs should be some explanation as to why the package couldn't be installed

Drake
10 Oct, 2023, 01:38

Exit code 9 could indicate low memory

ZachHandley
10 Oct, 2023, 02:02

I was not using the UI, I was using CLI

ZachHandley
10 Oct, 2023, 02:03

When I use CLI I can’t choose other than the default 4 and if I set it to Python-3.11 and try to deploy it it gives me a useless error about the runtime like I didn’t know that, so we have to use the UI to use any custom runtime or?

Drake
10 Oct, 2023, 02:03

It will only show you runtimes you have enabled

ZachHandley
10 Oct, 2023, 02:04
ZachHandley
10 Oct, 2023, 02:04

How do I enable runtimes?

Drake
10 Oct, 2023, 02:04

On cloud, we only have select runtimes enabled

ZachHandley
10 Oct, 2023, 02:05

OH

ZachHandley
10 Oct, 2023, 02:05

Okay

ZachHandley
10 Oct, 2023, 02:09

Hm okay so it could maybe be that Appwrite Cloud is just giving up?

ZachHandley
10 Oct, 2023, 02:13

Okay so it still fails with -8

ZachHandley
10 Oct, 2023, 02:13

-9

ZachHandley
10 Oct, 2023, 02:14

If that’s an “out of memory” error, you guys best fix that ASAP to be an actual “out of memory error”, as it stands right now it’s just a screw you number with no explanation and no solution, I didn’t know installing authorizenet was too much memory for this but I’ll look into self hosting

Drake
10 Oct, 2023, 03:26

This is an error thrown by pip. Googling pip exit code -9 showed multiple posts pointing towards a memory problem

ZachHandley
10 Oct, 2023, 04:41

damn

ZachHandley
10 Oct, 2023, 04:42

Aight my bad, sorry Steven

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