- Python version: 3.7 (I have to use this version)
- OS: Linux
- Cloud Platform: Azure
- Resource: Azure function with python
- Goal: Load a model created with skit-learn version 1.0.2 with the following dependencies installed:
numpy: 1.17.3 joblib: 1.1.0 scipy: 1.7.3
I am using joblib to load a skit-learn model that I trained (By the way I created the model locally in my machine with python 3.9). However, I am getting the following error:
Traceback (most recent call last):
File \"/home/site/wwwroot/sortierung/__init__.py\", line 51, in main
prediction_file_path)
File \"/home/site/wwwroot/shared_code/custom_functions_prediction.py\", line 255, in predict
result.update(classify_mail(m,s,X, stop_words, model_folder_path))
File \"/home/site/wwwroot/shared_code/custom_functions_prediction.py\", line 105, in classify_mail
model = load(modelFilePath)
File \"/home/site/wwwroot/.python_packages/lib/site-packages/joblib/numpy_pickle.py\", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File \"/home/site/wwwroot/.python_packages/lib/site-packages/joblib/numpy_pickle.py\", line 506, in _unpickle
obj = unpickler.load()
File \"/usr/local/lib/python3.7/pickle.py\", line 1088, in load
dispatch[key[0]](self)
File \"/usr/local/lib/python3.7/pickle.py\", line 1385, in load_stack_global
self.append(self.find_class(module, name))
File \"/usr/local/lib/python3.7/pickle.py\", line 1426, in find_class
__import__(module, level=0)\nModuleNotFoundError: No module named 'scipy.sparse._csr'
I checked in the scipy folder installed and I could not find this module. How could I solve this issue?. Tks in advance