I need to load a model that I locally developed using Python ver. 3.10 to Google Colab. However, when I tried loading the model, it returns a ModuleNotFoundError: No module named 'scipy.sparse._csr'
. I tried using this approach to upgrade the Python version on Colab to 3.10, but it still won't work. Below is my code:
#install python 3.10
!sudo apt-get update -y
!sudo apt-get install python3.10
#change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
#check python version
!python --version
# Python 3.10.6
Then I tried loading the model from my Google Drive:
NoPoverty_model = joblib.load(open("/content/drive/MyDrive/Colab Notebooks/Model/NoPoverty_model.sav", 'rb'))
# ModuleNotFoundError: No module named 'scipy.sparse._csr'
Does anyone knows how to solve this?