Installing greta (V 0.4.1): conda not up to date after install_greta_deps()

This is possibly not a real issue. It may well result from the interaction of my expectations with the error messages. However, there may be other people who think the same way I do, in which case a minor clarification of the error messages may be the solution.

I am your basement grade greta user. I am interested in doing some stuff with greta but, to the maximum extent possible, I want to avoid having to learn about the implementation infrastructure of greta. I use R, but I don’t use Python (even though I am sure it is installed by default on my linux PC).

My PC runs Ubuntu 21.10 64-bit. I have previously had greta installed and working correctly. When greta 0.4.1 came out on CRAN I decided to upgrade greta. Having seen some of the announcements about greta needing specific versions of tensorflow etc., I decide to uninstall the previous greta and do a fresh install of greta 0.4.1. (I did not uninstall the R packages for tensorflow, reticulate, etc.)

> install.packages("greta")
...
* DONE (greta)

> greta::greta_sitrep()
✓ python (version 3.7) available
✓ TensorFlow (version 1.14.0) available
✓ TensorFlow Probability (version 0.7.0) available
✓ greta conda environment available            
✓ Initialising python and checking dependencies ... done!          

ℹ greta is ready to use!

That all looks hunky-dory, but given the announcements about needing exact versions of dependencies I decided to run install_greta_deps(), presuming that it wouldn’t hurt if it was unnecessary.

> great::install_greta_deps()
✓ Python modules installed!                                        
• To see full installation notes run:
• `greta_notes_conda_install_output()`
• To see any error messages, run:
• `greta_notes_conda_install_error()`
✓ Installation of greta dependencies is complete!
• Restart R, then load greta with: `library(greta)`

That looks OK, but since it went to the trouble of mentioning notes and error messages I figure I should look at them.

> greta::greta_notes_conda_install_output()
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

# All requested packages already installed.

That looks OK.

> greta::greta_notes_conda_install_error()
==> WARNING: A newer version of conda exists. <==
  current version: 4.10.3
  latest version: 4.12.0

Please update conda by running

    $ conda update -n base -c defaults conda

Hmmmmm. It says it’s a warning, so it’s probably harmless. On the other hand, the recent announcements have been about needing specific versions and it is asking me to update. It even gives me the command for updating conda, so I’ll do that.

$ conda update -n base -c defaults conda
conda: command not found
$ which conda
$ 

I don’t appear to have conda installed as a command accessible directly from a terminal. A simple-minded search for conda doesn’t find it - so I install anaconda/conda from the terminal. Although the conda accessible from the terminal is the latest version, greta continues to use the out of date version of conda. From this, I presume that greta has it’s own separate instance of conda squirreled away somewhere semi-private.

Overall, I concluded that greta using an out of date version of conda is harmless (it may even be necessary), but it would have been nice for the warning message to be suppressed, or have an addendum that says to ignore it, or to have an addendum with instructions for updating greta’s private copy of conda.


At @njtierney 's request, I tried updating conda via reticulate::conda_update().

> reticulate::conda_update()
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/ross/.local/share/r-miniconda

  added / updated specs:
    - conda


The following packages will be downloaded:
...

The following NEW packages will be INSTALLED:
...

The following packages will be UPDATED:
...

Downloading and Extracting Packages
... 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
>

That looks like it worked. Now check what greta thinks about it.

> greta::install_greta_deps()
✓ Python modules installed!                                         
• To see full installation notes run:
• `greta_notes_conda_install_output()`
• To see any error messages, run:
• `greta_notes_conda_install_error()`
✓ Installation of greta dependencies is complete!
• Restart R, then load greta with: `library(greta)`
> greta::greta_notes_conda_install_error()
> greta::greta_sitrep()
✓ python (version 3.7) available
✓ TensorFlow (version 1.14.0) available
✓ TensorFlow Probability (version 0.7.0) available
✓ greta conda environment available            
ℹ greta is ready to use!
> 

That all looks OK.

1 Like

Hi Ross,

Thanks so much for posting this, I really appreciate it. It is definitely a concern to see a warning message like that, re the conda warning. When other people get such a warning, it’s great to have your documented process to point at.

Cheers!

Nick