A previously working version of Python virtual environment or shinyapps.io stopped working. It seems that it is because of automatic installation of the latest prerelease version of PIP package into the virtual environment and its incompatibility. My question is that how can I enforce virtual environment to use/ install a specific pip version? Here is the code:
Here is the Shinyappio log:
Using base prefix '/usr'
New python executable in \home\shiny.virtualenvs\myreticulate\bin\python3
Also creating executable in \home\shiny.virtualenvs\myreticulate\bin\python
Installing setuptools, pkg_resources, pip, wheel...done.
Requirement already up-to-date: wheel in \home\shiny.virtualenvs\myreticulate\lib\python3.5\site-packages (0.34.2)
Requirement already up-to-date: pip in \home\shiny.virtualenvs\myreticulate\lib\python3.5\site-packages (20.1b1)
: Requirement already up-to-date: setuptools in \home\shiny.virtualenvs\myreticulate\lib\python3.5\site-packages (46.1.3)
Using virtual environment 'myreticulate' ... Error in value3L : invalid version specification ‘20.1b1
I am trying to address it by reverting back to an older version of pip in the virtualenv_install function after the most recent release is automatically loaded via the virtualenv_create function. It works (i.e., pip is successfully downgraded to older version) when I run my app locally, but when I deploy it I get the same error in the shinyapps.io log.
Here's my current approach, for reference. I will update this if I find a solution.
I actually found a solution for this issue. Since the bugged version of pip gets installed as soon as your create the virtualenv, I forcibly uninstalled it and then installed the version that worked when I built my app. Here is the code that I used:
Hi,
I'm experiencing the same problem. However, the solution of uninstalling and reinstalling the older version of pip creates new errors when installing other packages such as numpy and pandas - the app runs fine locally so there shouldn't be syntax errors in the code. Any ideas what could be causing this?
This is the Shiny log I get when implementing the above solution: i.e.: