title: How to properly set the Python path for the reticulate package in OSX High Sierra?
body: <p>I have installed Python 3.7 in the default location for High Sierra using the official OSX package downloaded from the official Python site. When I run</p>
  
  <pre><code>which python3
  </code></pre>
  
  <p>I get the path</p>
  
  <pre><code>/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
  </code></pre>
  
  <p>I then run the following lines in R Studio</p>
  
  <pre><code>reticulate::use_python(python = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3')
  sys &lt;- import("sys")
  sys$version
  </code></pre>
  
  <p>It seems that I am still pointing to the default installation of 2.7</p>
  
  <pre><code>[1] "2.7.10 (default, Oct  6 2017, 22:29:07) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]"
  </code></pre>
  
  <p>I tried many other paths such as</p>
  
  <pre><code>/usr/local/bin/python3
  /usr/local/bin
  /Library/Frameworks/Python.framework/Versions/3.7/lib
  /usr/bin/python
  /Applications/Python 3.7
  </code></pre>
  
  <p>etc., but none seems to work. (it still shows 2.7.10)</p>
  
  <p>Obviously, I have tried googling for the solution but to no avail unfortunately. 
  Any guidance would be greatly appreciated.</p>
  
  <hr>
  
  <p><strong>Update:</strong>
  I finally got it to work by:</p>
  
  <ol>
  <li>Restarting the R Session as recommended by serv-inc</li>
  <li><p>Running the following commands:</p>
  
  <p><code>library(reticulate)
  reticulate::use_python(python = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3', required = T)
  sys &lt;- import("sys")
  sys$version</code></p>
  
  <p>to get the following response:</p>
  
  <p><code>[1] "3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) \n[Clang 6.0 (clang-600.0.57)]"</code></p></li>
  <li><p>If I have incorrectly specified an incorrect path such as <code>/usr/bin/python</code>, I would need to restart the R session or else reticulate would continue referring to the existing Python version.</p></li>
  </ol>
  
  <p>In short, the problem was caused by the incorrect path specified in the initial call to the <code>reticulate::use_python</code> function, and subsequent calls with the correct path would not take effect as it requires a 'fresh' R session.</p>