Can't get past python/miniconda install

At first, I chalked up my problems to being a novice Linux Mint user, but I was stumped at the same spot with pretty much the same messages after I ran install_greta_deps() on my Windows machine.

I installed and loaded greta and ran install_greta_deps() then restarted R. When I test greta [normal(0,1)] I get the message:

x Initialising python and checking dependencies, this may take a moment. … failed
Error: We have detected that you do not have the expected python packages setup.
You can set these up by running this R code in the console:
install_greta_deps()
Then, restart R and run:
library(greta)
(Note: Your R session should not have initialised Tensorflow yet.)
For more information, see ?install_greta_deps

I didn’t explicitly initialize Tensorflow and when I try to follow the second approach to setting up python/miniconda:

reticulate::install_miniconda()

I get:
Error: Miniconda is already installed at path “C:/Users/degaspec/AppData/Local/r-miniconda”.

  • Use reticulate::install_miniconda(force = TRUE) to overwrite the previous installation.

I tried reticulate::install_miniconda(force=TRUE) which seemed to work, followed by:

reticulate::conda_create(
        envname = "greta-env",
        python_version = "3.7"
      )
reticulate::conda_install(
        envname = "greta-env",
        packages = c(
          "numpy==1.16.4",
          "tensorflow-probability==0.7.0",
          "tensorflow==1.14.0"
        )
      )

...but at the end of all that I got the message:
Error: one or more Python packages failed to install [error code 1]

Looking for a solution to getting greta up and running.

Thanks! Curtis
1 Like

Hi Curtis!

Sorry I haven’t replied sooner, I’ve been away. Thanks for posting, hopefully we can resolve this together!

Can you clarify which version of greta you are running? We resolved a couple of issues where the installation would hang indefinitely, and the most current version should be 0.4.2, which is on CRAN now.

Could you try running:

greta_sitrep()

This should hopefully give a bit more information about what greta is seeing

Nick,

No worries. I have been able to get greta 0.4.2 up and running on another personal PC, but it is not really a functioning machine now that it is running Windows 11.

The issue with my work laptop running Windows 10 may be an administrator issue. When I run gretasitrep() on that machine I see “not available” for python, Tensorflow, and Tensorflow Probablilty. greta conda environment is available. After running install_greta_deps() I see install errors: tensorflow==1.14.0 not available from current channels and that one or more python packages failed to install.

On the machine running Linux Mint, I have greta 0.4.2 installed and the results from gretasitrep() are:

✓ python (version 3.7) available
x TensorFlow not available
✓ TensorFlow Probability (version 0.7.0) available
✓ greta conda environment available
x Initialising python and checking dependencies, this may take a moment. … failed
Warning message:
We have detected that you do not have the expected python packages setup.
You can set these up by running this R code in the console:
install_greta_deps()
Then, restart R and run:
library(greta)
(Note: Your R session should not have initialised Tensorflow yet.)
For more information, see ?install_greta_deps

1 Like

Hi Curtis,

I’m glad to hear that you were able to get it working on Windows 11! Re the issue on Windows 10,

tensorflow==1.14.0 not available from current channels and that one or more python packages failed to install.

You could perhaps try running

reticulate::conda_install("tensorflow==1.14.0")

To test out if there is an issue with installing specifically tensorflow 1.14?

I haven’t used Linux Mint before, did you try running

reticulate::conda_install(
        envname = "greta-env",
        packages = c(
          "numpy==1.16.4",
          "tensorflow-probability==0.7.0",
          "tensorflow==1.14.0"
        )
      )

Or did you try and install it on Linux with install_greta_deps()?

Cheers!

Nick

Nick,

Having some unrelated issues on the Linux machine, so for now on the Windows 10 machine:

 > reticulate::conda_install("tensorflow==1.14.0")
Error: argument "packages" is missing, with no default
- did you mean 'conda_install(<envname>, "tensorflow==1.14.0")'?
- use 'py_install("tensorflow==1.14.0")' to install into the active Python environment

Python 2.7.18 is installed on this machine.

1 Like

Hi Curtis,

Ah yes, sorry, my bad it should have been

reticulate::conda_install(packages = "tensorflow==1.14.0")

Were you able to try the following?

reticulate::conda_install(
        envname = "greta-env",
        packages = c(
          "numpy==1.16.4",
          "tensorflow-probability==0.7.0",
          "tensorflow==1.14.0"
        )
      )

Nick,

I tried that and it failed:

> reticulate::conda_install(
  • envname = "greta-env",
    
  • packages = c(
    
  •     "numpy==1.16.4",
    
  •     "tensorflow-probability==0.7.0",
    
  •     "tensorflow==1.14.0"
    
  • )
    
  • )
    Collecting package metadata (current_repodata.json): …working… done
    Solving environment: …working… failed with initial frozen solve. Retrying with flexible solve.
    Collecting package metadata (repodata.json): …working… done
    Solving environment: …working… failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • tensorflow==1.14.0

Current channels:

To search for alternate channels that may provide the conda package you’re
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

Error: one or more Python packages failed to install [error code 1]

1 Like

Hi Curtis,

Sorry to hear things aren’t working here, I was wondering, do either of your machines have permissions set by IT to block certain websites?

A colleague of mine recently had luck with the following, can you let me know how this goes?

library(greta)
remove_greta_env()
remove_miniconda()
install_greta_deps()

Also, just to confirm, are these errors on Windows, or Linux, or both?

Thanks again! Hopefully this works, keen to help get it running on your machine!