OMR-Research / mung

Music Notation Graph: a data model for optical music recognition.
MIT License
21 stars 6 forks source link

skimage not installed when installing via pip3.10 install mung #8

Closed nashirj closed 1 year ago

nashirj commented 2 years ago

When trying to install mung using pip, the requirements.txt didn't install properly:

>>> from mung.io import parse_cropobject_list
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nashirj/.local/lib/python3.10/site-packages/mung/io.py", line 211, in <module>
    from mung.node import Node
  File "/home/nashirj/.local/lib/python3.10/site-packages/mung/node.py", line 9, in <module>
    from mung.utils import compute_connected_components
  File "/home/nashirj/.local/lib/python3.10/site-packages/mung/utils.py", line 4, in <module>
    from skimage.measure import label
ModuleNotFoundError: No module named 'skimage'

I had to manually install pip3.10 install scikit-image, after which I was able to use mung. I believe it might have to do with the order of the dependencies in the requirements.txt file. One of the answers from this stack overflow post suggest putting the "error package" which I guess in this case would be scikit-image at the bottom of the requirements.txt file.

apacha commented 1 year ago
> pip install mung
Collecting mung
  Downloading mung-1.2.tar.gz (117 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.3/117.3 kB 2.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting numpy
  Using cached numpy-1.25.0-cp311-cp311-macosx_10_9_x86_64.whl (20.0 MB)
Collecting lxml
  Downloading lxml-4.9.3-cp311-cp311-macosx_11_0_universal2.whl (8.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.6/8.6 MB 5.9 MB/s eta 0:00:00
Collecting scikit-image
  Using cached scikit_image-0.21.0-cp311-cp311-macosx_10_9_x86_64.whl (12.9 MB)
Collecting scipy>=1.8
  Using cached scipy-1.11.1-cp311-cp311-macosx_10_9_x86_64.whl (37.0 MB)
Collecting networkx>=2.8
  Using cached networkx-3.1-py3-none-any.whl (2.1 MB)
Collecting pillow>=9.0.1
  Using cached Pillow-10.0.0-cp311-cp311-macosx_10_10_x86_64.whl (3.4 MB)
Collecting imageio>=2.27
  Using cached imageio-2.31.1-py3-none-any.whl (313 kB)
Collecting tifffile>=2022.8.12
  Downloading tifffile-2023.7.4-py3-none-any.whl (220 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 220.8/220.8 kB 4.1 MB/s eta 0:00:00
Collecting PyWavelets>=1.1.1
  Using cached PyWavelets-1.4.1-cp311-cp311-macosx_10_13_x86_64.whl (4.3 MB)
Collecting packaging>=21
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting lazy_loader>=0.2
  Using cached lazy_loader-0.3-py3-none-any.whl (9.1 kB)
Building wheels for collected packages: mung
  Building wheel for mung (setup.py) ... done
  Created wheel for mung: filename=mung-1.2-py3-none-any.whl size=124896 sha256=68ea818fbaacff587427917de9f396241ac4dc4607e81f7f52508992a66327e5
  Stored in directory: /Users/alex/Library/Caches/pip/wheels/1e/17/d3/64e4b30db07e7350e16ce6208ad827b5d30c4135f4f0aa9749
Successfully built mung
Installing collected packages: pillow, packaging, numpy, networkx, lxml, lazy_loader, tifffile, scipy, PyWavelets, imageio, scikit-image, mung
Successfully installed PyWavelets-1.4.1 imageio-2.31.1 lazy_loader-0.3 lxml-4.9.3 mung-1.2 networkx-3.1 numpy-1.25.0 packaging-23.1 pillow-10.0.0 scikit-image-0.21.0 scipy-1.11.1 tifffile-2023.7.4

The problem should be fixed with 1.2 - please re-open if this is still a problem.