Set python version on Connect Cloud when deploying using rsconnect via command line

Hey guys,

rsconnect-python 1.31.0 was just released, and I wanted to test it. I was able to add the server:

rsconnect add --connect-cloud --account myaccount --name cloud

then, I created a manifest:

rsconnect write-manifest shiny --requirements-file "pyproject.toml" --overwrite --verbose .

and I get the manifest.json and the requirements.txt. Finally, I run:

rsconnect deploy manifest --name cloud --verbose manifest.json

and it starts deploying. However, then in my terminal I get this error:

[INFO] 2026-09-08T22:50:21+0200 Publish requested
[INFO] 2026-09-08T22:50:23+0200 Publishing started
[INFO] 2026-09-08T22:50:24+0200 Published
[ERROR]: Posit Connect Cloud failed to publish the content: Unable to resolve dependencies from requirements.txt: This content's dependencies could not be resolved. Check your requirements.txt.. Please check the logs for more information.
Error: Posit Connect Cloud failed to publish the content: Unable to resolve dependencies from requirements.txt: This content's dependencies could not be resolved. Check your requirements.txt.. Please check the logs for more information.

and the logs on Connect Cloud say:

2026-09-08T22:50:23+02:00 Your publish request with ID 7be0d88d-154e-409e-a260-a757479bbc86 is now being processed.
2026-09-08T22:50:23+02:00 Loading your source code...
2026-09-08T22:50:23+02:00 Installing your code's dependencies into the environment.
2026-09-08T22:50:23+02:00 Error resolving dependencies: Because the current Python version (3.9.17) does not satisfy Python>=3.10 and plotnine==0.15.3 depends on Python>=3.10, we can conclude that plotnine==0.15.3 cannot be used.
And because you require plotnine==0.15.3, we can conclude that your requirements are unsatisfiable.
2026-09-08T22:50:24+02:00 Failed to publish content: This content's dependencies could not be resolved. Check your requirements.txt. error_id=b67be808-c63b-4ec8-ac7b-2897ce2d07b0

My pyproject.toml looks like this:

[project]
name = "myapp"
version = "1.6.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
    "brand-yml==0.1.1",
    "fastexcel>=0.20.2",
    "great-tables==0.17.0",
    "mpmath==1.3.0",
    "numpy==1.26.4",
    "pandas==2.2.2",
    "plotnine==0.15.3",
    "polars==1.3.0",
    "pyarrow==17.0.0",
    "reportlab==4.2.2",
    "scipy==1.14.0",
    "shiny==1.5.0",
    "shinyswatch==0.7.0",
    "statsmodels==0.14.6",
    "sympy==1.13.3",
    "xlsxwriter==3.2.2",
]

and the generated manifest:

"python": {
    "version": "3.12.4",
    "package_manager": {
      "name": "pip",
      "version": "24.1.2",
      "package_file": "requirements.txt"
    }
  },
  "environment": {
    "python": {
      "requires": "~=3.12.0"
    }
  },
...

So it clearly recorded a different python version than the 3.9.17 that Connect Cloud is using. I also figured out that connect cloud has 3.12 included: Python – Posit Connect Cloud Documentation. Furthermore, --overwrite-python-version in write-manifest is deprecated in favor of a .python-version file. Mine looke like this:

3.12

I have the feeling, I'm missing something ... Does someone have an idea or any thoughts?

Cheers,
Tobi

Hey Tobi

Sorry about this, you've uncovered a bug which we will fix ASAP: Connect Cloud deploys always use default python version · Issue #848 · posit-dev/rsconnect-python · GitHub

In the meantime, you should be able to edit the python version in the Connect Cloud UI and republish. Apologies for this, and thanks for reporting it so quickly!

thanks
Sam

Hey Sam,

thanks for the quick answer :slight_smile:

I should be able to change the python version in the settings of the app, right?

This is what I see.

Cheers
Tobi

Ah, sorry, I led you astray. You can only modify the python version for content published from GitHub.

I have started on a fix for this issue and it is available in the send-python-version-to-connect-cloud branch, if you wanted to try redeploy with that version.

pip install "git+https://github.com/rstudio/rsconnect-python.git@"send-python-version-to-connect-cloud

thanks for your patience
sam

The issue is a Python version mismatch. Your manifest requests Python 3.12, but Connect Cloud is actually using Python 3.9.17.
Since plotnine==0.15.3 requires Python ≥3.10, dependency resolution fails.
I would check why Connect Cloud is not honoring your .python-version file and verify that the deployment is configured to use Python 3.12. Your requirements.txt itself appears to be correctly generated.

The fix for this is now available in rsconnect-python version 1.31.1

thanks!
sam