ImageNet_Utils icon indicating copy to clipboard operation
ImageNet_Utils copied to clipboard

ImportError: No module named imagedownloader

Open bottydim opened this issue 6 years ago • 2 comments

bottydim avatar Oct 10 '17 15:10 bottydim

include

python _init_paths.py as part of the instructions in the README file or recommended fix the imports

bottydim avatar Oct 10 '17 15:10 bottydim

This can be fixed by changing _init_paths.py in a way that allows downloadutils.py to be run from anywhere, rather than just within ImageNet_Utils.

Here is a fixed version of _init_paths.py:

import os.path as osp
import sys

def add_path(path):
    if path not in sys.path:
        sys.path.insert(0, path)

this_dir = osp.dirname(__file__)

add_path(osp.join(this_dir,'libs'))

kirklandnuts avatar Jun 14 '18 00:06 kirklandnuts