See PR for greater explanation Set the minimal scipy version that contains scipy.optimize. Perhaps in time, we will adjust to >=1.9.0 instead of ==1.9.0.