Cannot deploy shiny app to shinyapps.io. Unsupported python version 3.2.3 for operating system jammy.

I've got this error trying to deploy my app to shinyapps.io, but my python version is 3.12 and I've tried a lot of things trying to figure out why it says something about python 3.2.3:

Validating server... [OK]
Validating app mode... [OK]
Making bundle ... [OK]
Deploying bundle ...
Waiting for task: 1431996756
[ERROR] 2024-06-29T22:55:09+0200 Build logs:

    [ERROR]: Application deployment failed with error: Unhandled Exception: child_task=1431996761 child_task_status=error: Unhandled Exception: Unsupported python version 3.2.3 for operating system jammy.

Error: Application deployment failed with error: Unhandled Exception: child_task=1431996761 child_task_status=error: Unhandled Exception: Unsupported python version 3.2.3 for operating system jammy.

1 Like

What libraries does your app use, and are they up to date? I'm wondering if you have a dependency that in turn depends on a stale version of python.

Hi there,

I'm having the same issue and my only packages used are matplotlib, numpy, shiny. I'm still looking into where the stale version is hiding.

I also created a new virtual environment so I know only those 3 packages are there.

Let me know if you find anything.

The shiny package depends on one other package and imports twenty-two others. Have you checked that all the packages you have are up to date?

I am facing the same error. My situation is the same as mlfal's. I created a new environment with Python 3.12.3 and installed numpy, matplotlib, shiny, and rsconnect-python using pip. For some reason, I get "Unsupported python version 3.2.3 for operating system jammy." when trying to deploy.

@prubin , I tried updating with pip install --upgrade. Is there any other way to check what you suggested?

Disclaimer: I am not a python user. That said, the first thing I would check is whether I've got both 3.2.3 and 3.12.3 installed for some reason. If so, deleting 3.2.3 might either fix the problem or at least point to an environment variable that's set to the old version.

Assuming that doesn't answer the question, I would try bisecting the problem by commenting out half the library loads (and if necessary the bulk of the executable code) and seeing if that installed. If yes, the problem would be in the other half of the library calls, so I would half of them back and repeat. If it didn't install, the problem would be in the library calls I kept, so I would comment out half of them and repeat. Eventually that should tell me which library is triggering the install error.

I would think to try write-manifest as discussed here :
posit-dev/rsconnect-python: Command line interface for publishing to Posit Connect (github.com)

I would think this would permit for review of both manifest.json and requirements.txt files.

Don't work, I got the exactly same error. The manifest.json created by the write-manifest comand was that:

"version": 1,
  "locale": "C.UTF-8",
  "metadata": {
    "appmode": "python-shiny",
    "entrypoint": "shiny.express.app:app_2e_py"
  },
  "python": {
    "version": "3.12.4",
    "package_manager": {
      "name": "pip",
      "version": "24.1.2",
      "package_file": "requirements.txt"
    }
  },
  "files": {
    "requirements.txt": {
      "checksum": "ee2cf64d11c92586210703ce03548b71"
    },
    "app.py": {
      "checksum": "ee0fd7a7bf3878290b3944a4cba0c119"
    }
  }
}

And the requirements.txt generated:

# requirements.txt generated by rsconnect-python on 2024-07-09 20:15:56.861328+00:00

anyio==4.4.0

appdirs==1.4.4

asgiref==3.8.1

click==8.1.7

contourpy==1.2.1

cycler==0.12.1

fonttools==4.53.1

h11==0.14.0

htmltools==0.5.2

idna==3.7

kiwisolver==1.4.5

linkify-it-py==2.0.3

markdown-it-py==3.0.0

matplotlib==3.9.1

mdit-py-plugins==0.4.1

mdurl==0.1.2

numpy==2.0.0

packaging==24.1

pillow==10.4.0

prompt-toolkit==3.0.36

PyJWT==2.8.0

pyparsing==3.1.2

python-dateutil==2.9.0.post0

python-multipart==0.0.9

questionary==2.0.1

semver==2.13.0

shiny==0.10.2

six==1.16.0

sniffio==1.3.1

starlette==0.37.2

typing_extensions==4.12.2

uc-micro-py==1.0.3

uvicorn==0.30.1

watchfiles==0.22.0

wcwidth==0.2.13

websockets==12.0

Moving to python 3.11 work here

Does Shinyapps just not support Python 3.12 yet then? Perhaps some sort of weird version checking going on?

I was a little confused because vinitg96 wrote that he tried 3.12.3 but the manifest he shared with us was the more modern (and less likely to be supported 3.12.4

I'm having the same error. Shiny documentation suggests switching to python version 3.7.13/8.13/9.13. I did so, but the error persists.

I ran into the same error and reported it here: Cryptic error with Python 3.12 · Issue #35 · posit-dev/py-shinylive · GitHub