No module named pandas error even though I have it installed and interpreter set (Dataspell, Jupyter notebook/lab))

597 views Asked by At

Package manager: conda

  • Using virtual environment: base conda environment

  • Errors found in the following IDEs: Dataspell, Jupyter notebook

- No errors in the following IDE: vs code

error:

import pandas as pd
no module named 'pandas'

First I'll go through the dataspell/jupyter notebook issue

Dataspell/jupyter notebook

enter image description here

Notice the executable. It's not using the conda python exe. Notice the path. Reaffirms that it's not seeing the anaconda directory.

But when I open the interpreter settings for this workspace,

enter image description here

The kernelspec

Note: There's only one kernel spec directory enter image description here

The file looks like this

enter image description here

It works in vscode

enter image description here

Again Notice the executable and path. Both are using/seeing the anaconda python exe.

So my question is this - Why isn't dataspell/jupyter notebook seeing anaconda as a path and using the base env? And how do I fix it?

1

There are 1 answers

2
Bruce Murdock On

The link in Wayne's comment worked. Just needed to create a new kernel by going into the virtual environment. https://stackoverflow.com/a/71733561/8508004 is the post that has the answer.