Numpy dependency error occurs while deploying

Hi everyone
Thanks for the great service.

I’ve been trying to deploy an ML service on Streamlit sharing but stuck at the last minute with the following:

ImportError: Unable to import required dependencies:

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:
Troubleshooting ImportError — NumPy v1.22.dev0 Manual
Please note and check the following:

  • The Python version is: Python3.8 from “/home/appuser/venv/bin/python”
  • The NumPy version is: “1.21.0”

Through the internet I realized this error can be resolved by reinstalling numpy so I made dependency settings for environment.yml as below but it didn’t work anyways.

name: fastbook
- fastai
- pytorch
- defaults

  • python>=3.6
  • pytorch>=1.6
  • torchvision
  • pip
  • pip:
    • fastai>=2.0.0
    • numpy==1.21.0
    • graphviz
    • ipywidgets
    • matplotlib
    • nbdev>=0.2.12
    • pandas
    • scikit_learn
    • azure-cognitiveservices-search-imagesearch
    • sentencepiece
    • streamlit

Do you have any idea how I can troubleshoot this?