Using Reticulate Library

I am getting an error - "ImportError: No module named pandas"

Mac, Anaconda3

library(reticulate)
use_condaenv("/Users/Anjalikhushalani/anaconda3/bin/python")
import pandas

It's not clear what steps you've done to get to this point, but you might start here with someone having a similar problem: https://stackoverflow.com/questions/51585149/cant-figure-out-how-to-use-conda-environment-after-reticulateuse-condaenvpat

I think the problem is that you are not providing a conda evironment but the path to your python installation, if that is the case, then you have to use use_python() function instead, for example this works on windows.

library(reticulate)
use_python("C:\\Users\\user_name\\Anaconda3\\python.exe", require = TRUE)
pd <- import("pandas")

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