How to fix: Importing error: cannot import name?

602 views Asked by At

I have the following code:

import sys
import os
import numpy
import pathlib
from ants import image_read, resample_image, iMath, from_numpy, threshold_image, copy_image_info, image_write
from copy import copy
from keras.models import load_model
from keras import backend as K
import timeit

On line 5, I get an error: ImportError: cannot import name 'image_read' from 'ants'. Why does this occur? How can I fix the ImportError?

0

There are 0 answers