I'm writing the shinyapp with keras which can run perfectly locally. But when I planned to publish it to shinyapp.io, there was an error
Preparing to deploy application...DONE
Uploading bundle for application: 3512640...DONE
Deploying bundle: 4141903 for application: 3512640 ...
Waiting for task: 859989544
building: Processing bundle: 4141903
building: Parsing manifest
building: Building image: 4712958
building: Installing system dependencies
################################ Begin Task Log ################################
[2021-01-25T20:07:31.909244868+0000] Execute script: packages/build/tensorflow.sh
+ set -e
+ curl -O https://bootstrap.pypa.io/get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1883k 100 1883k 0 0 4718k 0 --:--:-- --:--:-- --:--:-- 4708k
+ python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 24226, in <module>
main()
File "get-pip.py", line 199, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File "/tmp/tmpSAjf8y/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
################################# End Task Log #################################
????: Unhandled Exception: Child Task 859989545 failed: Error building image: Build exited with non-zero status: 1
?????
Python version
> reticulate:: py_config()
python: C:/Users/hanwe/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython: C:/Users/hanwe/AppData/Local/r-miniconda/envs/r-reticulate/python36.dll
pythonhome: C:/Users/hanwe/AppData/Local/r-miniconda/envs/r-reticulate
version: 3.6.10 |Anaconda, Inc.| (default, May 7 2020, 19:46:08) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/hanwe/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy
numpy_version: 1.19.1
I have tried R 4.0.2 and R 3.6.3, but both versions didn't resolve this issue. I have also added the code in .Rprofile referring to https://github.com/ranikay/shiny-reticulate-app/blob/master/.Rprofile, but it didn't work either.
question from:
https://stackoverflow.com/questions/65892859/error-when-deploying-shiny-app-with-keras 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…