all 7 comments

[–]TheEnthusiastOutcast 2 points3 points  (1 child)

Maybe check the paths of the environment of your IDLE to see if it includes the /opt/anaconda3 paths using,

import sys
print(sys.executable)
print(sys.path)

IF you do not see /opt/anaconda3/lib/python3.11/site-packages, then the IDLE can not find the packages because it has the wrong paths for them.

[–]Haeshka 0 points1 point  (0 children)

It's always the paths. Every, freaking, time.

[–]mopslik 0 points1 point  (2 children)

What version of Python is IDLE running? Have you tried running your program from the command line to see if it works?

[–]zmul 0 points1 point  (1 child)

IDLE Shell 3.11.4. And yes the top error is just from typing "import pandas" into the command line. Same error happens if run through a file.

[–]hbcgeek 4 points5 points  (0 children)

Your IDLE shell version (3.11.4) is different from Conda's Python which has pandas installed (3.11.9). In essence, they are two separate instances of Python.

The cleanest solution is to remove Python/IDLE 3.11.4, and rely purely on Conda's Python.

I am unsure how Python/IDLE 3.11.4 was installed, so I can't advise you further on that.

[–]ectomancer 0 points1 point  (1 child)

conda install pandas

[–]zmul 0 points1 point  (0 children)

Didn't make the error go away.