MAGIC icon indicating copy to clipboard operation
MAGIC copied to clipboard

"Error: package or namespace load failed for 'Rmagic'

Open tuoliver opened this issue 4 years ago • 3 comments

I receive the following after trying to utilize Rmagic in any way after installing miniconda/python3 and going through all steps:

Error: package or namespace load failed for ‘Rmagic’: .onLoad failed in loadNamespace() for 'Rmagic', details: call: python_config(python_version, required_module, python_versions) error: Error 1 occurred running /usr/bin/python3 In addition: Warning message: In system2(command = python, args = paste0(""", config_script, : running command ''/usr/bin/python3' "/Library/Frameworks/R.framework/Versions/4.0/Resources/library/reticulate/config/config.py" 2>/dev/null' had status 1

tuoliver avatar Jun 10 '20 19:06 tuoliver

@tuoliver can you please fill in the bug report template? It contains a lot of diagnostic information I need from you.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Standalone code to reproduce the error

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior Please include the full traceback of any errors

System information:

Output of magic.__version__:

If you are running MAGIC in R or Python, please run magic.__version__ and paste the results here.

You can do this with `python -c 'import magic; print(magic.__version__)'`

Output of pd.show_versions():

If you are running MAGIC in R or Python, please run pd.show_versions() and paste the results here.

You can do this with `python -c 'import pandas as pd; pd.show_versions()'`

Output of sessionInfo():

If you are running MAGIC in R, please run sessionInfo() and paste the results here.

You can do this with `R -e 'library(Rmagic); sessionInfo()'`

Output of reticulate::py_discover_config(required_module = "magic"):

If you are running MAGIC in R, please run `reticulate::py_discover_config(required_module = "magic")` and paste the results here.

You can do this with `R -e 'reticulate::py_discover_config(required_module = "magic")'`

Additional context Add any other context about the problem here.

scottgigante avatar Jun 12 '20 17:06 scottgigante

I encountered the same problem yesterday, not sure if this helps but did you install magic-impute as a python package?

Per README:

To use MAGIC, you will need to install both the R and Python packages.

Try running pip install magic-impute then try R -e 'install.packages("Rmagic", repos="https://cloud.r-project.org/")' and it should fix the problem.

I encountered the same error message when I was trying to install Rmagic on a slurm cluster using install.packages("Rmagic", repos="https://cloud.r-project.org/"). Granted this might be a hidden issue since when I tried installing Rmagic in R 4.0.2 in my local Mac, it worked fine (I did not get any error during installation in R despite the fact I don't have magic-impute on Mac).

At first I did not even realize to check the manual, I just assume Rmagic worked like any other packages (e.g. ggplot2), where I just install.packages it and it would work (and it did, on my local Mac). But apparently (at least on a Linux based server), magic-impute needs to be installed first before running install.packages("Rmagic") in R.

sgyzetrov avatar Apr 06 '21 06:04 sgyzetrov

There is a solution for installation here #211

TeodoraTockovska avatar Oct 13 '23 19:10 TeodoraTockovska