ImportError: cannot import name '_validate_lengths'

Traceback (most recent call last):
  File "test_FAN.py", line 613, in 
    fa0 = FaceAlignment(LandmarksType._2D, device='cuda:0') #by me
  File "test_FAN.py", line 228, in __init__
    globals(), locals(), [face_detector], 0)
  File "/home/sdd/Face/alignment/myFaceAlignment2018_1_9/face_alignment/__init__.py", line 7, in 
    from .api import FaceAlignment, LandmarksType, NetworkSize
  File "/home/sdd/Face/alignment/myFaceAlignment2018_1_9/face_alignment/api.py", line 6, in 
    from skimage import io
  File "/home/sdd/Face/miniconda3/envs/face_alignment/lib/python3.6/site-packages/skimage/__init__.py", line 167, in 
    from .util.dtype import (img_as_float32,
  File "/home/sdd/Face/miniconda3/envs/face_alignment/lib/python3.6/site-packages/skimage/util/__init__.py", line 8, in 
    from .arraycrop import crop
  File "/home/sdd/Face/miniconda3/envs/face_alignment/lib/python3.6/site-packages/skimage/util/arraycrop.py", line 8, in 
    from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths'

numpy版本太高,我对numpy进行了重新安装:

pip install numpy==1.15.0

 

你可能感兴趣的:(python)