

Previously, when I ran a simplified version of my script in the Rstudio console, only focusing on reticulate, I g0t a completely different error: > library(reticulate) ModuleNotFoundError: No module named 'gseapy' It is superseded by request to `use_python("/home/tjm/anaconda3/envs/r405v1/bin/python") Warning: Previous request to `use_python("/home/tjm/anaconda3/envs/r420v1/bin/python3", required = TRUE)` will be ignored. When my script it fails at the python block where I import gseapy: > library(reticulate) However, they're there when I run py_list_packages() (see bottom row for gseapy): Moreover, the other python packages I need, gseapy, matplotlib, and pandas are all installed in conda environment r420v1 but cannot be found. NOTE: Python version was forced by use_python function Numpy: /home/tjm/anaconda3/envs/r420v1/lib/python3.11/site-packages/numpy Pythonhome: /home/tjm/anaconda3/envs/r420v1:/home/tjm/anaconda3/envs/r420v1 Libpython: /home/tjm/anaconda3/envs/r420v1/lib/libpython3.11.so Python: /home/tjm/anaconda3/envs/r420v1/bin/python3 However, it identifies only numpy (correct version 1.24.2 also seen in r420v1), also in the as the sole package available, but there are dozens more. Setting a conda environment (in this case named r420v1 where python is in "/home/tjm/anaconda3/envs/r420v1/bin/python3" ) in reticulate "works" in that it sets the appropriate version of python, libpython, and python home.
