·ImportError: cannot import name ‘_validate_lengths

1. Problem description

This is a problem encountered during Python development

. from numpy.lib.arraypad import _validate_lengths ImportError: cannot import name '_validate_lengths'Copy the code

Error: from numpy.lib.arraypad import _validate_lengths

The speculation is that _validate_lengths were removed or renamed after Numpy was updated

The conjecture was confirmed by a search of data

2. Problem solving

To degrade numpy, perform the following operations in the appropriate Python environment:

PIP install numpy = = 1.15.0Copy the code

hope this helps