I opened up a Jupyter notebook on which I was working just a couple of weeks ago and went to re-import the modules I had been using (by running the cell again, with no changes), and encountered an unexpected difficulty when trying to import scipy.optimize (even though the exact same command worked just fine before): It tells me that there is no module named 'scipy.optimize._root', and when I look it up, it looks like there is an underscore where there should not be; however, I do not know how to amend this, has this happened to anyone else by chance?
I was trying to import the curve_fit module so that I can do a particular fit to the data that my group and I took in our optics lab class and then print the parameters of the fit.
Initially, I was trying to import curve_fit using
from scipy.optimize import curve_fit
(This had worked in the recent past, but suddenly is resulting in an error.) Next, I tried to just import scipy.optimize, which also gave me the same error.
I expected to be able to import the module, however I am met with the following error message:
ModuleNotFoundError: No module named 'scipy.optimize._root'