Pick Python version on shinyapps.io

Hi,

I'm trying to run some python scripts using reticulate in my dashboard and I'm getting the following:

Warning: Error in py_call_impl: AttributeError: type object 'str' has no attribute 'maketrans'

This should work, but only in Python 3 so I'm guessing my script is being run in Python 2. Is there a way to specify the version I want the shinyapps server to use?

I am trying to use:
use_python("/usr/local/bin/python3", required = TRUE)

But I don't know the path for python3.

Thanks,
Dean

From what I understand reticulate doesn't currently do a great job of allowing one to choose their python when multiple versions are present, but work is underway to improve things. I would suggest tracking the progress in the repo.

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