Skip to content

Instantly share code, notes, and snippets.

@LouisFaure
Created April 19, 2024 19:57
Show Gist options
  • Save LouisFaure/39c3ada3a60d5ea16ae10d9d9ab54879 to your computer and use it in GitHub Desktop.
Save LouisFaure/39c3ada3a60d5ea16ae10d9d9ab54879 to your computer and use it in GitHub Desktop.
set conda environment specific R_HOME before import rpy2
import os, sys
os.environ['R_HOME'] = sys.exec_prefix+"/lib/R/"
import rpy2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment