ModuleNotFoundError for skimage

Hello! I keep getting the error below. Is there a better import or install statement? If not, how can I get around this error?

Here’s the full code when I try to deploy.

[manager] Starting up repository: 'seedling_sorter', branch: 'main', main module: 'app.py'

[manager] Cloning repository...

[manager] Cloning into '/app/seedling_sorter'...

[manager] Cloned repository!

[manager] Pulling code changes from Github...

[manager] Processing dependencies...

Collecting numpy

  Downloading numpy-1.21.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 163.8 MB/s eta 0:00:00[2022-02-23 12:37:08.546317] 

Collecting Pillow==9.0.1

  Downloading Pillow-9.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 182.2 MB/s eta 0:00:00[2022-02-23 12:37:09.061130] 

Collecting skimage

  Downloading skimage-0.0.tar.gz (757 bytes)

  Preparing metadata (setup.py): started

  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error

  

  × python setup.py egg_info did not run successfully.

  │ exit code: 1

  ╰─> [3 lines of output]

      

      *** Please install the `scikit-image` package (instead of `skimage`) ***

      

      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed


× Encountered error while generating package metadata.

╰─> See above for output.


note: This is an issue with the package mentioned above, not pip.

hint: See above for details.

[manager] installer returned a non-zero exit code

[manager] Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

[manager] Streamlit server consistently failed status checks

[manager] Please fix the errors, push an update to the git repo, or reboot the app.

I’ve tried:

  • Removing my requirements.txr file entirely. It tells me that skimage cannot be found.
  • Adding a specific version of skimage. I get the same error as above.

Here’s my repo: GitHub - elizabeth-oda/seedling_sorter: Seedling Sorter is a deep learning app that can identify 12 types of seedlings (small plants) with 81% accuracy.

Thank you in advance!

Hi @elfel -

Using Streamlit Cloud, I don’t get an error message as far as I can tell…is this still an issue for you?

Best,
Randy

Hi Randy,

Thanks for trying it out! After I sent the message above, I tried using pipreqs to generate the requirements.txt file automatically. That still didn’t work. Eventually I was able to get it to work using the following requirements.txt file:

numpy
Pillow==9.0.1
scikit_image
streamlit==1.3.1
tensorflow==2.7.0
matplotlib==3.5.1