The problem is that you are not really using the conda environment to run the jupyter notebook. To verify this is the case, run in the terminal window and also insert in the jupyter notebook the following code:
import sys
print(sys.path)
In my case, I was running a python script and I got Terminal window
['', '/home/sputnik/.conda/envs/compchem/lib/python310.zip',
'/home/sputnik/.conda/envs/compchem/lib/python3.10',
'/home/sputnik/.conda/envs/compchem/lib/python3.10/lib-dynload',
'/home/sputnik/.conda/envs/compchem/lib/python3.10/site-packages']
Script run ./script.py
['/home/sputnik', '/usr/lib/python38.zip', '/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages']
In my case the solution was to run the script explicitly calling python
python ./script.py
In the case of a Jupyter Notebook you will need to make sure it is running in the correct environment. You can use this package to help:
pip install environment_kernels
And get more information from:
http://stuartmumford.uk/blog/jupyter-notebook-and-conda.html