dhlab-epfl/dhSegment

Can't run train.py

alix-tz opened this issue · 1 comments

Hello,

I am trying to train my own model with dhSegment but it seems I can't get train.py to run.
I also tried following the demo instructions to see if I was still getting the same error and I do:

python train.py with demo/demo_config.json
Traceback (most recent call last):
  File "train.py", line 8, in <module>
    from dh_segment.io import input
  File "/home/timeus/demo_dhseg/dhSegment/dh_segment/io/__init__.py", line 140, in <module>
    from . import via
  File "/home/timeus/demo_dhseg/dhSegment/dh_segment/io/via.py", line 12, in <module>
    from skimage import transform
  File "/home/timeus/miniconda3/envs/dh_segment/lib/python3.6/site-packages/skimage/__init__.py", line 158, in <module>
    from .util.dtype import *
  File "/home/timeus/miniconda3/envs/dh_segment/lib/python3.6/site-packages/skimage/util/__init__.py", line 7, in <module>
    from .arraycrop import crop
  File "/home/timeus/miniconda3/envs/dh_segment/lib/python3.6/site-packages/skimage/util/arraycrop.py", line 8, in <module>
    from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths'

Is it a problem within the script or am I missing a requirement?
For information, I am only using a CPU at the moment.

Many thanks,

Fixed this problem :

  • installing tensorflow/tensorboard led me to install numpy==1.16.1 in which _validate_lengths no longer exists, making it incompatible with dhSegment.

scikit-image/scikit-image#3586