filmov
tv
Setting and Running Python with Reticulate Package in RStudio for Windows OS

Показать описание
In this video, I will walk through steps to set up a python environment in a RStudio project directory. I used the Windows 10 OS.
#python , #RStudio , #reticulate
Steps:
1. PREREQUISITE - anaconda ready, correct path to python in Windows PATH
2. TEST WINDOW AND PYTHON CONNECTION
3. CREATE NEW RSTUDIO PROJECT
4. INSTALL VIRTUALENV
5. CREATE A NEW ENV
6. ACTIVATE ENV
7. INSTALL PYTHON LIBRARIES
8. Create .Rprofile file
A comment from Dr David Hopp (Thanks Dr Hopp) below:
It turns out that even after following your directions I still had a problem. It was with the PATH variable, that left-over from thirty-five years ago. My problem with the local PATH was two-fold. First, I had done some python/miniconda installs, which I uninstalled, but good old PATH still had pointers to python, and when Windows couldn't find that folder, it defaulted to offer the python app from Windows Store. I got rid of that (after hunting it down) and then trying to run pip didn't work (stackexchange helped with that in some old questions). I had the path to miniconda3 in my PATH but I had to add others too as per C:\Users\cassi\miniconda3; C:\Users\cassi\miniconda3\Scripts;
C:\Users\cassi\miniconda3\Library\bin
That was a critical step. Every once in a while there is a rumor that MS will get rid of PATH, but it hasn't happened yet. If you have the opportunity to add these PATH suggestions as a note it might help others save time. Once again, please accept my gratitude for your video.
Best regards
David Hopp, Ph.D.
#python , #RStudio , #reticulate
Steps:
1. PREREQUISITE - anaconda ready, correct path to python in Windows PATH
2. TEST WINDOW AND PYTHON CONNECTION
3. CREATE NEW RSTUDIO PROJECT
4. INSTALL VIRTUALENV
5. CREATE A NEW ENV
6. ACTIVATE ENV
7. INSTALL PYTHON LIBRARIES
8. Create .Rprofile file
A comment from Dr David Hopp (Thanks Dr Hopp) below:
It turns out that even after following your directions I still had a problem. It was with the PATH variable, that left-over from thirty-five years ago. My problem with the local PATH was two-fold. First, I had done some python/miniconda installs, which I uninstalled, but good old PATH still had pointers to python, and when Windows couldn't find that folder, it defaulted to offer the python app from Windows Store. I got rid of that (after hunting it down) and then trying to run pip didn't work (stackexchange helped with that in some old questions). I had the path to miniconda3 in my PATH but I had to add others too as per C:\Users\cassi\miniconda3; C:\Users\cassi\miniconda3\Scripts;
C:\Users\cassi\miniconda3\Library\bin
That was a critical step. Every once in a while there is a rumor that MS will get rid of PATH, but it hasn't happened yet. If you have the opportunity to add these PATH suggestions as a note it might help others save time. Once again, please accept my gratitude for your video.
Best regards
David Hopp, Ph.D.
Комментарии