Check
sys.executable
andsys.path
inside the notebook - I bet your kernel is not running in the environment you intended it to.
finds the python3
kernel.
jupyter kernelspec list
https://stackoverflow.com/questions/65576206/how-to-change-python-version-in-jupyter-notebook
pip3 install ipykernel --upgrade
python3 -m ipykernel install --user