...I wrote a ShinyApp to display the results of python scripts by creating a python virtual environment, The Shiny code works well on my own computer, and it also can be deployed. But when I opened the url after the deployment, a error appeared as follow:
It shows that the python virtual environment folder I created is not what it is. But there was no error when I run it locally. Here is my part of code:
Thanks so much, I have checked the Troubleshooting you mentioned in the reply and discarded applying use_python with a.exe, but the problem is still unresolved.
I'm not sure what you mean by making the virtualenv in shinyapps.io, actually, I have bundled all required files when I deployed the app. The following action is what I have done before using it.!
Uploading your virtualenv is not likely to result in success either, since there is likely compiled code that works on whatever you are running locally, e.g. Windows, that will not work on shinyapps.io which runs Linux.
There is work underway in the rsconnect package to capture Python packages. Once that is released, there will need to be work on shinyapps.io to install them.
In the meantime, you will need to create the virtualenv and install the packages in the code that you deploy to shinyapps.io.
Hi, I have transplanted my project to Ubuntu virtual machine and configured the python virtual environment in it, but when i deploy it to shinyapp.io, i got the error as follow:
You should not need to translate your project to Ubuntu.
What you need to do is create the virtualenv from within the code you deploy, so that it is recreated in shinyapps.io. You should not be uploading the venv from your local machine.
Actually, I don't understand how to create the virtualenv within the code , could you please give me some instructions or some blogs? Thank you so much ahead.
I would start off at the reticulate site, and then post to the Community with appropriate tags, e.g. "reticulate" and "python", if you have specific questions that aren't covered by the package documentation. You could also open a Github issue.