Changing the default python version of RStudio [on hold]











up vote
3
down vote

favorite
1












In RStudio, usinglibrary('PythonInR'), and then usingPythonInR::pyConnect()
it shows that the location of the python called is /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7,
however there is no such package in my mac because I've deleted it.

I just want to know how to change the default python path of RStudio when I use PythonInR?










share|improve this question









New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by Ankit Agarwal, Owen Pauling, EdChum, Nguyễn Thanh Tú, Rob 11 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • have u tried any groups or google?
    – sai saran
    17 hours ago















up vote
3
down vote

favorite
1












In RStudio, usinglibrary('PythonInR'), and then usingPythonInR::pyConnect()
it shows that the location of the python called is /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7,
however there is no such package in my mac because I've deleted it.

I just want to know how to change the default python path of RStudio when I use PythonInR?










share|improve this question









New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by Ankit Agarwal, Owen Pauling, EdChum, Nguyễn Thanh Tú, Rob 11 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • have u tried any groups or google?
    – sai saran
    17 hours ago













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





In RStudio, usinglibrary('PythonInR'), and then usingPythonInR::pyConnect()
it shows that the location of the python called is /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7,
however there is no such package in my mac because I've deleted it.

I just want to know how to change the default python path of RStudio when I use PythonInR?










share|improve this question









New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











In RStudio, usinglibrary('PythonInR'), and then usingPythonInR::pyConnect()
it shows that the location of the python called is /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7,
however there is no such package in my mac because I've deleted it.

I just want to know how to change the default python path of RStudio when I use PythonInR?







python r






share|improve this question









New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 16 hours ago









Christian

10.7k2893155




10.7k2893155






New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 17 hours ago









TahYM

161




161




New contributor




TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






TahYM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as too broad by Ankit Agarwal, Owen Pauling, EdChum, Nguyễn Thanh Tú, Rob 11 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as too broad by Ankit Agarwal, Owen Pauling, EdChum, Nguyễn Thanh Tú, Rob 11 hours ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • have u tried any groups or google?
    – sai saran
    17 hours ago


















  • have u tried any groups or google?
    – sai saran
    17 hours ago
















have u tried any groups or google?
– sai saran
17 hours ago




have u tried any groups or google?
– sai saran
17 hours ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













PythonInR has parameters that let you specify your python environment that you want to use with R/R Studio in a variety of ways -



library('PythonInR')
pyConnect(pythonExePath = "C:/ProgramData/Anaconda3/python.exe", dllDir = "C:/ProgramData/Anaconda3", pythonHome = "C:/ProgramData/Anaconda3")`


From the documentation




Arguments



pythonExePath a character containing the path to
"python.exe" (e.g. "C:Python27python.exe")



dllDir an optional
character giving the path to the dll file. Since the dll file is
normally in a system folder or in the same location as python.exe,
this parameter is almost never needed!



pythonHome an optional
character giving the path to PYTHONHOME. On Windows by default
PYTHONHOME is the folder where python.exe is located, therefore this
parameter is normally not needed
.



dllName a character giving the name
of the dll file (e.g.d "python27.dll"). majorVersion an integer giving
the major Python version (e.g. 2 or 3).



pyArch a character giving the
Python architecture, i.e. "32bit" or "64bit". useCstdout a logical
indicating if the C stdout should be used or the stout should be
redirected at a Python level.




TL; DR



Use pythonExePath to specify the python exe location and give it a go. Try subsequent parameters if things still don't work






share|improve this answer























  • thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
    – TahYM
    16 hours ago


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













PythonInR has parameters that let you specify your python environment that you want to use with R/R Studio in a variety of ways -



library('PythonInR')
pyConnect(pythonExePath = "C:/ProgramData/Anaconda3/python.exe", dllDir = "C:/ProgramData/Anaconda3", pythonHome = "C:/ProgramData/Anaconda3")`


From the documentation




Arguments



pythonExePath a character containing the path to
"python.exe" (e.g. "C:Python27python.exe")



dllDir an optional
character giving the path to the dll file. Since the dll file is
normally in a system folder or in the same location as python.exe,
this parameter is almost never needed!



pythonHome an optional
character giving the path to PYTHONHOME. On Windows by default
PYTHONHOME is the folder where python.exe is located, therefore this
parameter is normally not needed
.



dllName a character giving the name
of the dll file (e.g.d "python27.dll"). majorVersion an integer giving
the major Python version (e.g. 2 or 3).



pyArch a character giving the
Python architecture, i.e. "32bit" or "64bit". useCstdout a logical
indicating if the C stdout should be used or the stout should be
redirected at a Python level.




TL; DR



Use pythonExePath to specify the python exe location and give it a go. Try subsequent parameters if things still don't work






share|improve this answer























  • thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
    – TahYM
    16 hours ago















up vote
0
down vote













PythonInR has parameters that let you specify your python environment that you want to use with R/R Studio in a variety of ways -



library('PythonInR')
pyConnect(pythonExePath = "C:/ProgramData/Anaconda3/python.exe", dllDir = "C:/ProgramData/Anaconda3", pythonHome = "C:/ProgramData/Anaconda3")`


From the documentation




Arguments



pythonExePath a character containing the path to
"python.exe" (e.g. "C:Python27python.exe")



dllDir an optional
character giving the path to the dll file. Since the dll file is
normally in a system folder or in the same location as python.exe,
this parameter is almost never needed!



pythonHome an optional
character giving the path to PYTHONHOME. On Windows by default
PYTHONHOME is the folder where python.exe is located, therefore this
parameter is normally not needed
.



dllName a character giving the name
of the dll file (e.g.d "python27.dll"). majorVersion an integer giving
the major Python version (e.g. 2 or 3).



pyArch a character giving the
Python architecture, i.e. "32bit" or "64bit". useCstdout a logical
indicating if the C stdout should be used or the stout should be
redirected at a Python level.




TL; DR



Use pythonExePath to specify the python exe location and give it a go. Try subsequent parameters if things still don't work






share|improve this answer























  • thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
    – TahYM
    16 hours ago













up vote
0
down vote










up vote
0
down vote









PythonInR has parameters that let you specify your python environment that you want to use with R/R Studio in a variety of ways -



library('PythonInR')
pyConnect(pythonExePath = "C:/ProgramData/Anaconda3/python.exe", dllDir = "C:/ProgramData/Anaconda3", pythonHome = "C:/ProgramData/Anaconda3")`


From the documentation




Arguments



pythonExePath a character containing the path to
"python.exe" (e.g. "C:Python27python.exe")



dllDir an optional
character giving the path to the dll file. Since the dll file is
normally in a system folder or in the same location as python.exe,
this parameter is almost never needed!



pythonHome an optional
character giving the path to PYTHONHOME. On Windows by default
PYTHONHOME is the folder where python.exe is located, therefore this
parameter is normally not needed
.



dllName a character giving the name
of the dll file (e.g.d "python27.dll"). majorVersion an integer giving
the major Python version (e.g. 2 or 3).



pyArch a character giving the
Python architecture, i.e. "32bit" or "64bit". useCstdout a logical
indicating if the C stdout should be used or the stout should be
redirected at a Python level.




TL; DR



Use pythonExePath to specify the python exe location and give it a go. Try subsequent parameters if things still don't work






share|improve this answer














PythonInR has parameters that let you specify your python environment that you want to use with R/R Studio in a variety of ways -



library('PythonInR')
pyConnect(pythonExePath = "C:/ProgramData/Anaconda3/python.exe", dllDir = "C:/ProgramData/Anaconda3", pythonHome = "C:/ProgramData/Anaconda3")`


From the documentation




Arguments



pythonExePath a character containing the path to
"python.exe" (e.g. "C:Python27python.exe")



dllDir an optional
character giving the path to the dll file. Since the dll file is
normally in a system folder or in the same location as python.exe,
this parameter is almost never needed!



pythonHome an optional
character giving the path to PYTHONHOME. On Windows by default
PYTHONHOME is the folder where python.exe is located, therefore this
parameter is normally not needed
.



dllName a character giving the name
of the dll file (e.g.d "python27.dll"). majorVersion an integer giving
the major Python version (e.g. 2 or 3).



pyArch a character giving the
Python architecture, i.e. "32bit" or "64bit". useCstdout a logical
indicating if the C stdout should be used or the stout should be
redirected at a Python level.




TL; DR



Use pythonExePath to specify the python exe location and give it a go. Try subsequent parameters if things still don't work







share|improve this answer














share|improve this answer



share|improve this answer








edited 16 hours ago

























answered 16 hours ago









Vivek Kalyanarangan

3,9521725




3,9521725












  • thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
    – TahYM
    16 hours ago


















  • thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
    – TahYM
    16 hours ago
















thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
– TahYM
16 hours ago




thx. But I've already tried this method in another laptop of windows system and it did work. But it just could not work when applied to my macbook, it still connects to the default python path.
– TahYM
16 hours ago



Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)