Python on R Studio connect

We're trying to push a python jupyter notebook to R Studio Connect but receive an error message indicating that virtualenv is not installed:

opt/python/3.9.4/bin/python3.9: No module named virtualenv
Error during installation: virtualenv failed with exit code 1; removing environment from cache: /opt/rstudio-connect/mnt/python-environments/pip/3.9.4/

On my local machine I'm:

  • running Python 3.9.4
    -working with the example stock-report-jupyter notebook
    -working within a virtual environment
    -have rsconnect-python installed
    -using the publish to r studio connect button
    -creating a new requirements.txt as part of the process, this then gives the error.

The server is managed by IT however I have been working with them and they have confirmed that they

  • followed the R Studio Python setup instructions
  • have the correct version of python is installed(although they do also have two other versions of Python installed)
  • have virtualenv installed for the correct version of Python (have tested that they can import this from the terminal)

What can we try next?

As a pro customer, you can reach out to our support team for help with this:

Thank you for supporting our work!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.