Importing rpy2.robjects fails in the jupyter notebook with LookupError: 'show' not found
, however, import works in the commandline python interpreter with activated environment. How can I make it work in the notebook?
I have created the conda environment with rpy2 and ipykernel installed and have linked it to jupyter via python -m ipykernel install --user --name env --display-name "env"
(within the activated environment). I looked up the path of the environment in kernel.json under the path provided by jupyter kernelspec list
and found it to be the correct one of my environment. I do not get the error when I start jupyter notebook from within the activated environment and try to import rpy2.rojects. I would have thought that this should not make any difference. Furthermore, when starting the python interpreter via ./python
within the ~home/user/anaconda3/envs/env
, I do obtain the error. It seems some environment variables are set differently when starting the notebook with or without activated environment, but I do not have any clue which and how. I'll be happy about any hints to understand the issue.