简体   繁体   中英

R installation not finding anaconda packages

I was trying to install some packages in R and I have run into an error:

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'

This is strange to me because I definitely have pandas:

$ conda list | grep pandas
pandas                    1.0.1            py37h0573a6f_0

Also which python seems to give me my anaconda installation:

/home/usrname/anaconda3/bin/python

I am installing these packages on WSL (Windows Subsystem for Linux) Ubuntu.

Any advice appreciated.

I ended up finding another issue with a similar problem. Turns out I needed to activate the conda r-reticulate environment.

Take a look at a similar question here: Python in R - Error: could not find a Python environment for /usr/bin/python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM