I am working on a markdown document in RStudio Cloud - you can view it here: https://rstudio.cloud/project/735788
(please note, I put eval = F in the chunk so it would knit for class purposes)
When I try to call matplotlib and use pyplot, I get this error message:
RuntimeError: Evaluation error: ImportError: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/matplotlib/../../../libpng16.so.16) Detailed traceback: File "/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/matplotlib/pyplot.py", line 722, in savefig res = fig.savefig(*args, **kwargs) File "/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/matplotlib/figure.py", line 2180, in savefig self.canvas.print_figure(fname, **kwargs) File "/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 2082, in print_figure **kwargs) File "/home/rstudio-user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 501, in print_png from matplotlib import _png . Detailed traceback: File "<string>", line 1, in <module> File "/home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.6/reticulate/python/rpytools/call.py", line 21, in python_function raise RuntimeError(res[kErrorKey])
Googling has lead me to believe that I can't fix this myself - it's a missing library that would normally be installed with sudo. Any other suggestions?