Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs calling install_gluonts() on arm64 Mac M1 #41

Open
chenx2018 opened this issue Jan 11, 2022 · 7 comments
Open

Error occurs calling install_gluonts() on arm64 Mac M1 #41

chenx2018 opened this issue Jan 11, 2022 · 7 comments

Comments

@chenx2018
Copy link

chenx2018 commented Jan 11, 2022

Error occurs calling install_gluonts() on arm64 Mac M1.

It seems like there are some pacakges are not available in 3.7 Python channel. The error code is the following:

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

  - python=3.7.1

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/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: Error creating conda environment 'r-gluonts' [exit code 1]

Using the develope version of reticulate pacakge to install miniconda, the Python version is 3.8.12.

Here is my python information calling reticulate::py_discover_config()

python:         /Users/username/Library/r-miniconda-arm64/envs/r-reticulate/bin/python
libpython:      /Users/username/Library/r-miniconda-arm64/envs/r-reticulate/lib/libpython3.8.dylib
pythonhome:     /Users/username/Library/r-miniconda-arm64/envs/r-reticulate:/Users/username/Library/r-miniconda-arm64/envs/r-reticulate
version:        3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:25:50)  [Clang 11.1.0 ]
numpy:          /Users/username/Library/r-miniconda-arm64/envs/r-reticulate/lib/python3.8/site-packages/numpy
numpy_version:  1.22.0

Any suggestions? Thanks!

@chenx2018 chenx2018 changed the title Cannot Installed the package on arm64 Mac M1 Error occurs calling install_gluonts() on arm64 Mac M1 Jan 11, 2022
@mdancho84
Copy link
Contributor

I'd try following the Installation Guide here, which has troubleshooting guidance for the Python Environment and details on how to set up custom environments.

As of this message, the major requirements are:

  • gluonts>=0.8.0 (required for modeltime.gluonts >= 0.3.0). Note that I test with gluonts==0.8.0, so I recommend that version.
  • mxnet~=1.7
  • pandas
  • numpy
  • pathlib
  • ujson

@chenx2018
Copy link
Author

I tried the above approach by calling:

reticulate::py_install(
    envname  = "my_gluonts_env",
    python_version = "3.8.12",
    packages = c(
        "mxnet~=1.7",
        "gluonts==0.8.0",
        "pandas==1.0.5",
        "numpy",
        "pathlib==1.0.1",
        "ujson==4.0.2"
    ),
    method = "conda",
    pip = TRUE
)

and the error is:

ERROR: Could not find a version that satisfies the requirement mxnet~=1.7 (from versions: 1.6.0)
ERROR: No matching distribution found for mxnet~=1.7
Error: Error installing package(s): "'mxnet~=1.7'", "'gluonts==0.8.0'", "'pandas==1.0.5'", "'numpy'", "'pathlib==1.0.1'", "'ujson==4.0.2'"

@mdancho84
Copy link
Contributor

MXNet is up to 1.9.0 on pypi so pip should be able to install it. Maybe try changing to 1.9.0.

@chenx2018
Copy link
Author

I think the only available version of mxnet is 1.6.0 as the error message shows:

ERROR: Could not find a version that satisfies the requirement mxnet~=1.9.0 (from versions: 1.6.0)
ERROR: No matching distribution found for mxnet~=1.9.0
Error: Error installing package(s): "'mxnet~=1.9.0'", "'gluonts==0.8.0'", "'pandas==1.0.5'", "'numpy'", "'pathlib==1.0.1'", "'ujson==4.0.2'"

@TT4T
Copy link

TT4T commented Mar 24, 2022

same here.
Any news?

I think the only available version of mxnet is 1.6.0 as the error message shows:

ERROR: Could not find a version that satisfies the requirement mxnet~=1.9.0 (from versions: 1.6.0)
ERROR: No matching distribution found for mxnet~=1.9.0
Error: Error installing package(s): "'mxnet~=1.9.0'", "'gluonts==0.8.0'", "'pandas==1.0.5'", "'numpy'", "'pathlib==1.0.1'", "'ujson==4.0.2'"

@mdancho84
Copy link
Contributor

Are you using M1? I believe that is the problem.

@frostbite345
Copy link

frostbite345 commented Mar 30, 2022

I got it to work by using the older R & Rstudio that isn’t optimized for M1. Thus using Rosetta.
@mdancho84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants