Module Not Found Error with one version of of Python, but no the other

86 views Asked by At

I am using a VS Code (Linux Mint) plug-in for Python that allows me to choose between different interpreters.

When I run my file with Python 3.8, I get an error saying that it can't find pandas I am trying to use, but when I switch the interpreter to Python 3.6 there is no issue finding pandas.

What's going on?

2

There are 2 answers

1
Kral On

The module might not be updated for Python 3.8. Search up the module's name from GitHub or where it can be imported from to see what versions they support.

2
wjandrea On

That module isn't installed for Python 3.8, simple as that. Different versions of Python have different libraries (listed under sys.path) on Debian-based distros.

Without knowing which module, it's hard to say much else, like whether it even supports 3.8, but to install it, you might be able to use apt or pip.