Cloud9 Debugger Not Working for Python3.10

0

Problem

I upgraded my python environment to python3.10 for my cloud9 ec2 instance. Building a serverless lambda function works using SAM and I can run json events via SAM command line. However. when I try to run those same events in the Could9 Run/Debugger, I get the following error while the application is trying to build:

Fetching public.ecr.aws/sam/build-python3.10:latest-x86_64 Docker container image...
2023-09-07 17:11:27 [INFO]: .
2023-09-07 17:11:27 [INFO]: .
2023-09-07 17:11:27 [INFO]: .
2023-09-07 17:11:27 [INFO]: 

2023-09-07 17:11:27 [INFO]: Mounting /home/ec2-user/environment/src as /tmp/samcli/source:ro,delegated, inside runtime container

2023-09-07 17:11:43 [INFO]: 
Build Failed

2023-09-07 17:11:44 [INFO]:  Running PythonPipBuilder:ResolveDependencies
Error: PythonPipBuilder:ResolveDependencies - {ikp3db==1.4.1(sdist)}

Also Tried Manual Install of ikp3db

It apparently has to do with ikp3db. Tried installing it manually using pip install ikp3db, but that also gives an error:

  creating build/temp.linux-x86_64-cpython-310
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/ec2-user/environment/venv/include -I/home/ec2-user/.pyenv/versions/3.10.13/include/python3.10 -c iksettrace3.c -o build/temp.linux-x86_64-cpython-310/iksettrace3.o
  iksettrace3.c: In function ‘IK_SetTrace’:
  iksettrace3.c:111:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if(loopThreadState->thread_id!=debuggerThreadIdent) {
                                        ^~
  iksettrace3.c:117:30: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘use_tracing’; did you mean ‘tracing’?
               loopThreadState->use_tracing = loopThreadState->c_profilefunc != NULL;
                                ^~~~~~~~~~~
                                tracing
  iksettrace3.c:122:30: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘use_tracing’; did you mean ‘tracing’?
               loopThreadState->use_tracing = ((func != NULL) || (loopThreadState->c_profilefunc != NULL));
                                ^~~~~~~~~~~
                                tracing
  iksettrace3.c:128:30: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘use_tracing’; did you mean ‘tracing’?
               loopThreadState->use_tracing = loopThreadState->c_profilefunc != NULL;
                                ^~~~~~~~~~~
                                tracing
  error: command '/usr/bin/gcc' failed with exit code 1
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ikp3db
  Failed to build ikp3db
  ERROR: Could not build wheels for ikp3db, which is required to install pyproject.toml-based projects

Any suggestions?

1 Answer
-1

The error you're encountering during the installation of ikp3db while using Python 3.10 in your AWS Cloud9 environment could be related to a compatibility issue with the package and Python 3.10. Specifically, the ikp3db package appears to rely on certain features or APIs that have changed in Python 3.10, resulting in build failures.

Some suggestions are to:

Other options:

  • Check compatibility and use the compatible one.
  • Downgrade python (solely depends on your requirement)
  • Try alternative debugger compatible with python 3.10
  • Contact the Package Maintainer or the open-source community to request support for Python 3.10 or report the compatibility issue.

Some links, which could be related to this: [+]https://stackoverflow.com/questions/53204916/what-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install

[+]https://github.com/aws/aws-sam-cli/issues/1840

[+]https://github.com/cmorisse/ikp3db

[+]https://github.com/onnx/onnx/issues/4376

[+]https://ikpdb.readthedocs.io/en/1.x/

profile pictureAWS
SUPPORT ENGINEER
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions