From a02906c361744f688f5891b9c671b0dd7ed9ff73 Mon Sep 17 00:00:00 2001
From: Ben Anderson <b.anderson@soton.ac.uk>
Date: Tue, 14 Jun 2022 15:05:09 +0000
Subject: [PATCH] using python within RStudio

---
 howTo/usePythonInRStudio.md | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 howTo/usePythonInRStudio.md

diff --git a/howTo/usePythonInRStudio.md b/howTo/usePythonInRStudio.md
new file mode 100644
index 0000000..dfe23d0
--- /dev/null
+++ b/howTo/usePythonInRStudio.md
@@ -0,0 +1,16 @@
+Yes it's possible. I'm not sure why you would but we're a broad church so...
+
+You need to set the interpreter...
+
+On a mac:
+
+ * open Terminal
+ * type `which python`
+ * I get "/opt/anaconda3/bin/python"
+ * you might get other flavours and locations
+ * it needs to be the one that get updated when you install modules using `pip install numpy pandas matplotlib
+ * in RStudio go to Project options -> python. If you are not using an RStudio project do this in Global options instead
+ * paste the results of `which python` into the 'select' box. You can try to use the auto-find feature but it didn't find conda for me
+ * Save. RStudio will want to restart 
+
+ If you open a .py file and try to run it RStudio will want to install reticulate which is R's interface to Python (apparently).
-- 
GitLab