MAGIC icon indicating copy to clipboard operation
MAGIC copied to clipboard

Error in py_module_import when Seurat is loaded before Rmagic

Open petrsh opened this issue 5 years ago • 1 comments

Describe the bug Hi, I'm not sure that this is actually a bug in Rmagic but it might be helpful for other users to report it here. When loading Seurat before Rmagic I get an error that there's no module named 'magic'. When loading Rmagic first it's ok.

sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.4

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] phateR_1.0.4 Rmagic_2.0.3 Matrix_1.2-18 Seurat_3.1.5

loaded via a namespace (and not attached): [1] httr_1.4.1 tidyr_1.0.0 jsonlite_1.6 viridisLite_0.3.0
[5] splines_3.6.1 lsei_1.2-0 leiden_0.3.1 gtools_3.8.1
[9] assertthat_0.2.1 yaml_2.2.0 ggrepel_0.8.1 globals_0.12.4
[13] pillar_1.4.3 lattice_0.20-38 glue_1.3.1 reticulate_1.13
[17] digest_0.6.22 RColorBrewer_1.1-2 colorspace_1.4-1 cowplot_1.0.0
[21] htmltools_0.4.0 plyr_1.8.4 pkgconfig_2.0.3 tsne_0.1-3
[25] listenv_0.7.0 purrr_0.3.3 patchwork_1.0.0 scales_1.0.0
[29] RANN_2.6.1 gdata_2.18.0 Rtsne_0.15 tibble_3.0.1
[33] ggplot2_3.2.1 ellipsis_0.3.0 ROCR_1.0-7 pbapply_1.4-2
[37] lazyeval_0.2.2 survival_2.44-1.1 magrittr_1.5 crayon_1.3.4
[41] memoise_1.1.0 future_1.14.0 nlme_3.1-141 MASS_7.3-51.4
[45] gplots_3.0.1.1 ica_1.0-2 tools_3.6.1 fitdistrplus_1.0-14 [49] data.table_1.12.6 lifecycle_0.2.0 stringr_1.4.0 plotly_4.9.0
[53] munsell_0.5.0 cluster_2.1.0 irlba_2.3.3 compiler_3.6.1
[57] rsvd_1.0.2 caTools_1.17.1.2 rlang_0.4.5 grid_3.6.1
[61] ggridges_0.5.1 rstudioapi_0.10 RcppAnnoy_0.0.13 htmlwidgets_1.5.1
[65] igraph_1.2.4.1 bitops_1.0-6 npsurv_0.4-0 gtable_0.3.0
[69] codetools_0.2-16 reshape2_1.4.3 R6_2.4.1 gridExtra_2.3
[73] zoo_1.8-6 dplyr_0.8.3 uwot_0.1.8 future.apply_1.3.0 [77] KernSmooth_2.23-16 ape_5.3 stringi_1.4.3 parallel_3.6.1
[81] Rcpp_1.0.2 vctrs_0.2.4 sctransform_0.2.0 png_0.1-7
[85] tidyselect_0.2.5 lmtest_0.9-37

petrsh avatar Jul 03 '20 08:07 petrsh

Hi @petrsh , can you please post the output of the following with and without loading Seurat first?

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() without Seurat:

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 sessionInfo() with Seurat:

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

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

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

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")'`

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

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 'library(seurat); reticulate::py_discover_config(required_module = "magic")'`

scottgigante avatar Jul 06 '20 14:07 scottgigante