[R-sig-Debian] how to install R 4.4
Stephen Bond
@tephen@cbond @end|ng |rom y@hoo@com
Wed May 14 20:32:40 CEST 2025
Folks,
Sorry to bother you, but I have bad news. Normal R packages work, but
keras and tensorflow keep crashing. After 2 hours of trying to
reinstall I still have nothing.
can anybody suggest a way to install tensorflow and keras under 4.5?
(let me know if I should be posting in a different forum.)
I am pasting the script that used to work under 4.4
```
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::update_packages()
remotes::install_cran(c("readr", "tibble", "zip", "fs", "listarrays"))
install.packages("reticulate")
reticulate::miniconda_uninstall()
unlink("~/.pyenv", recursive = TRUE)
unlink("~/.virtualenvs/r-reticulate", recursive = TRUE)
python <- reticulate::install_python("3.12.3")
reticulate::virtualenv_create("r-reticulate", python = python)
install.packages("keras") # keras3
install.packages("tensorflow")
keras::install_keras( envname = "r-reticulate", # keras3
extra_packages = c("keras-tuner", "ipython", "kaggle"))
```
if keras is replaced with keras3 then the install will finish, but it
keeps crashing when I try to run code.
I also discovered that google colab made it very difficult to install
keras in colab. maybe keras is meant to be on python only??
Thanks everybody
On Wed, 2025-05-14 at 08:36 -0500, Dirk Eddelbuettel wrote:
>
> On 14 May 2025 at 09:12, Stephen Bond wrote:
> > I do not care about version. My packages are in
> >
> > /home/stephen/R/x86_64-pc-linux-gnu-library/4.4/
> >
> > and and after renaming the 4.4 folder I can load them.
> > How do you avoid the version naming of the package folder?
>
> It's a personal preference but I tend to set things up such that I
> have no
> user-local directory, and that has worked for a few decades now:
>
> $ Rscript -e 'print(.libPaths())'
> [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library"
> "/usr/lib/R/library"
> $
>
> If one likes to have one it is still possibly to skip either or both
> of the
> architecture and the version part, see eg /etc/R/Renviron* and the
> hint about
> the help(Startup) page.
>
> > This is not really pressing as even as is the setup is acceptable.
> > I
> > did not know packages from older versions work on upgraded r-base.
>
> It is hard to get an official word. I think R Core still 'recommends
> it' just
> to start from a clean plate, but I know from my Debian packaging work
> that it
> is (generally) not a requirement as R Core is so careful about not
> removing
> things from the ABI. Packages build under older R generally just
> work, which
> is a good thing. (Packages built under newer R get you a warning
> 'built under
> X.Y ...'.) So for me no need for a forced rebuild and installation
> of all
> packages.
>
> Best, Dirk
>
More information about the R-SIG-Debian
mailing list