Unable to resolve "No module named 'seaborn' error in Jupyter Notebook

Please try %pip list which is the current best practice. In 2019, the magic %pip versions of commands were added to overcome confusing things like you are seeing. The exclamation point used in conjunction with pip, especially for install commands can be veery misleading as it only applies to the location the situation where the shell command is sent off to run, which isn’t necessarily in the environment the kernel backing the notebooks is using. You should be also using %pip list to see what is installed in the kernel environment that your notebook is using. The magic pip command variation was added in 2019 to ensure the action occurs in the environment where the kernel is running that backs the active notebook. See more about the modern %pip command here. The second paragraph here goes into more details about why the exclamation point in conjunction with pip may lead to issues.

In other words, because you used the exclamation point with pip you learned that yes it is installed. But that is aside from the point because that is not where the ipykernel is running.
%pip list run in the notebook should reflect this.

An option:

If you don’t want to take the time to work out things on this remote machine and connect your kernel to the environment you actually installed to, just run %pip install seaborn in a cell in your active notebook on the remote machine. Let it run to completion and restart the kernel as instructed & then it should work.
That is the example for seaborn; however, you can do similar for numpy and pandas, too.


If you do want to work things out the long way without installing it again in the correct environment you are presently working in, see here and here for some pointers of things to investigate.