I have been trying to install keras and tensorflow into my RStudioCloud over the past few days. Seems to not be working. The error messages that I have got are "Error: Error installing package(s): 'tensorflow==2.5'" and "Killed
Error: Error installing package(s): 'tensorflow==2.5', 'keras', 'tensorflow-hub', 'requests', 'Pillow', 'h5py', 'pyyaml'". Everything goes well until install_keras(). I am also on the premium version of RStudio Cloud so it's not really a space thing. My code is attached below:
It turns out that by default python's pip needs just under 3 GB RAM in order to be able to install tensorflow
You can increase the RAM to 3GB for the installation, or you can work around this by adding an option --no-cache-dir to pip like this:
You sir, are a genius. In fact, not only did your code work, it helped show me what was the problem with my code - I hadn't adjusted the memory allocated to me when I switched to the paid RStudio Cloud version. It runs either with the --no-cache-dir option or by increasing memory (of course, this option eats into your project hours).