I am trying to use the reticulate package in a Rmd file. I first created a setup chunk as follows:
library(reticulate)
use_virtualenv("r-reticulate")
use_python("C:\\Python27")
Then I import pandas
:
#importing libraries
import pandas
ImportError: No module named pandas
Detailed traceback:
File "<string>", line 1, in <module>
I have checked that pandas is already installed from the python command line. Why am I getting an import error here?
pandas
while the virtualenv was active? – Interchangepip install pandas
from inside your virtualenv. – Interchangepip install pandas
? Python does not recognize that. I can only do that in cmd on Windows and I am not sure if there is a cmd engine in knitr. Sorry, I am an R user and still learning Python. – Chanel