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

"pandas" error while installing leiden (found what is wrong) #11

Closed
cakirb opened this issue Dec 15, 2020 · 5 comments
Closed

"pandas" error while installing leiden (found what is wrong) #11

cakirb opened this issue Dec 15, 2020 · 5 comments
Assignees

Comments

@cakirb
Copy link

cakirb commented Dec 15, 2020

I tried to install leiden with install.packages("leiden") command in R (Ubuntu 18.04). But I had an error showing that I don't have "pandas" (actually I have). While checking the output messages, I noticed something weird in environment location.

During installation process, some packages are installed in r-reticulate environment (/home/user/anaconda3/envs/r-reticulate).

** testing if installed package can be loaded from temporary location
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/pirlab/anaconda3/envs/r-reticulate

  added / updated specs:
    - python


The following NEW packages will be INSTALLED:
...

But in the final step, environment location changes:

** testing if installed package can be loaded from final location
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/user/anaconda3/envs/r-reticulate/envs/r-reticulate


  added / updated specs:
    - python


The following packages will be downloaded:
...
...
...
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Error: package or namespace load failed for ‘leiden’:
 .onAttach failed in attachNamespace() for 'leiden', details:
  call: py_module_import(module, convert = convert)
  error: ModuleNotFoundError: No module named 'pandas'

Detailed traceback: 
  File "/home/pirlab/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 19, in _import_hook
    module = _import(

Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/pirlab/R/x86_64-pc-linux-gnu-library/4.0/leiden’
Warning in install.packages :
  installation of package ‘leiden’ had non-zero exit status

As seen, the path of environment location is repeated. I resolved this problem by creating r-reticulate environment and installing pandas in the env by myself.

conda env remove -n r-reticulate
conda install --name r-reticulate pandas

I would like to report this bug in installation process. Thanks...

@BJWiley233
Copy link

As a work around you can install panads to the r-reticulate environment from command line with:

conda activate r-reticulate
conda install pandas

Then you should be able to install leiden.

@cakirb
Copy link
Author

cakirb commented Dec 23, 2020

Yes actually I already fixed my issue, I wanted to share it as a bug to be fixed in the next releases

@TomKellyGenetics
Copy link
Owner

Thanks for reporting the issue. I'll try get it fixed in upcoming releases as you've suggested. The most recent version does have some changes that may caused this. The idea was to handle the installation on python modules (needed for Leiden, UMAP, and Seurat) if conda is available. Sorry if this caused trouble, it was intended to avoid this.

@TomKellyGenetics
Copy link
Owner

Thanks for reporting! This issue should be patched in the 0.3.7 release. An update is required soon to ensure compatibility with new CRAN requirements.

@TomKellyGenetics
Copy link
Owner

leiden version 0.3.7 is on CRAN!

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

3 participants