I have been learning python for about a year now. I just downloaded R to try using Python with Reticulate. I have all of my python packages pip installed in an anaconda base environment named base
. I am getting everything to work except pandas. It’s the most bizzare thing.
Here’s my code:
{r}
library(reticulate)
use_condaenv(“base”)
{python}
import numpy as np
import matplotlib.pyplot as plt
This works fine and I’m able to use both packages in RStudio. However, when I try to import pandas as pd
, I get the error
ImportError: No Module named pandas...
I most definitely have pandas pip installed in this base environment along with the other two packages. Just to be sure, I double checked by running a pip install
for all 3 again. Why in the world won’t pandas work? It’s so frustrating! FWIW: seaborn (and other packages) doesn’t work either and is installed as well.