reticulate ImportError: No module named pandas in Rstudio version 1.2 Ask Question

I have posted this question on stackoverflow also.

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?

You have to specify the full path to python.exe file, something like this
use_python("C:\\Users\\andre\\Anaconda3\\python.exe")
EDIT: I'm supposing you are on windows because of the "C:\"

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.