I have a random forest model that I am building in a pipeline that uses scikit-learn v0.23.1. Once the model is built I am downloading it and trying to locally load it using model = joblib.load("model_name.joblib")
.
However, when I try to do this I get the error:
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/usr/local/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "/usr/local/Cellar/python@3.7/3.7.9_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pickle.py", line 1088, in load
dispatch[key[0]](self)
File "/usr/local/Cellar/python@3.7/3.7.9_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pickle.py", line 1385, in load_stack_global
self.append(self.find_class(module, name))
File "/usr/local/Cellar/python@3.7/3.7.9_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pickle.py", line 1426, in find_class
__import__(module, level=0)
ModuleNotFoundError: No module named 'scipy.sparse._csr'
I have done this process fine for a while and only recently it has started to get the above error.