Skip to content

How to install optimizer AdaMod into Keras/Reticulate virtual environment? #2

@faltinl

Description

@faltinl

I am working with Keras for R to experiment with neural networks and I use a Conda virtual environment under Reticulate to occasionally access additional Python packages. My attempt to install optimizer AdaMod, however, fails. I keep getting the following results (to be seen within R under RStudio):

> library(reticulate)
> conda_list()
          name                                         python
1   Miniconda3                     C:\\Miniconda3\\python.exe
2 r-reticulate C:\\Miniconda3\\envs\\r-reticulate\\python.exe
> reticulate::use_virtualenv("C:\\Miniconda3\\envs\\r-reticulate")

Thus, my virtual environment is there and working. Now I continue:

> py_install("adamod")
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##
  environment location: C:\Miniconda3\envs\r-reticulate
  added / updated specs:
    - python
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    certifi-2020.6.20          |           py36_0         156 KB
    ------------------------------------------------------------
                                           Total:         156 KB

The following packages will be UPDATED:
  certifi                                 2020.4.5.1-py36_0 --> 2020.6.20-py36_0

Downloading and Extracting Packages
certifi-2020.6.20    | 156 KB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
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:
  - adamod
Current channels:
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch
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]

Under the address https://anaconda.org I can't find anything useful.
Question: how should I proceed to get the AdaMod package installed and available within my R environment as required?
Thanks in advance for any useful hint!

Note: This issue is related to the issue Transfer of a new Python optimizer to Keras in R rstudio /
keras #1049

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions