Anaconda3 packages affecting tensorflow/keras on Jupyter notebook?

I have had issues with tensorflow/keras for a while where it won’t run on jupyter (the kernel gets killed and is forced to restart) as well as locally on my python IDE – pycharm:

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scipy/ UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"

I decided to look into whhy this could be a problem and I noticed that my python packages are put into my anaconda3 directory (path: …/opt/anaconda3/lib/python3.9/site-packages on an M2 MacBook if that information helps). I wonder if this is the problem behind my issues, and if not how can I fix this problem?

I just wanted to know if anyone’s free to help