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: package or namespace load failed for 'Rmagic' #187

Open
tuoliver opened this issue Jun 10, 2020 · 3 comments
Open

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

tuoliver opened this issue Jun 10, 2020 · 3 comments
Labels

Comments

@tuoliver
Copy link

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

@scottgigante
Copy link
Contributor

@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.

@sgyzetrov
Copy link

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.

@TeodoraTockovska
Copy link

There is a solution for installation here #211

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

No branches or pull requests

4 participants