business-science / modeltime.gluonts

GluonTS Deep Learning with Modeltime
https://business-science.github.io/modeltime.gluonts/
Other
38 stars 11 forks source link

MacOS Installation: install_gluonts() error: command 'gcc' failed with exit status 1. Failed building wheel for ujson. #13

Closed mdancho84 closed 3 years ago

mdancho84 commented 3 years ago

Problem

Initial error with install_gluonts() results in a failure that looks like this:

EnvironmentLocationNotFound: Not a conda environment

Error: installation of 'python=3.6' into environment 'r-gluonts' failed [error code 1]

Attempt to install with reticulate::py_install() fails also.

py_install(
    packages = c(
        "mxnet==1.6",
        "gluonts==0.6.3",
        "numpy==1.16.6",
        "pandas==1.0.5",
        "scikit-learn==0.23.2",
        "matplotlib==3.3.2",
        "seaborn==0.11.0",
        "pathlib==1.0.1"
    ),
    envname = "my_gluonts_env",
    method  = "conda",
    python_version = "3.6",
    pip     = TRUE
)

Returns an error message that looks like this:

error: command 'gcc' failed with exit status 1. 

ERROR: Failed building wheel for ujson.
mdancho84 commented 3 years ago

Solution

This appears to be releated to 'gcc', which is handled with Xcode. The solution is to update / install Xcode.

In terminal, run:

xcode-select --install

Then, re-run install_gluonts().