def initialize_repo_managers(CODE_DIR, pythoncmd, PY2, PY3):
    import utool as ut
    WITH_CNN = True
    WITH_QT = (not ut.get_argflag('--no-qt'))
    WITH_GUI = (not ut.get_argflag('--no-gui'))
    WITH_CUSTOM_TPL = True
    WITH_PLUGINS = True
    ibeis_rman = ut.RepoManager(['https://github.com/WildbookOrg/utool.git', 'https://github.com/WildbookOrg/vtool.git', 'https://github.com/WildbookOrg/dtool.git', 'https://github.com/Erotemic/ubelt.git', 'https://github.com/WildbookOrg/detecttools.git'], CODE_DIR, label='core', pythoncmd=pythoncmd)
    tpl_rman = ut.RepoManager([], CODE_DIR, label='tpl', pythoncmd=pythoncmd)
    if (not GET_ARGFLAG('--ignore-opencv')):
        cv_repo = ut.Repo('https://github.com/Itseez/opencv.git', CODE_DIR, modname='cv2')
        tpl_rman.add_repo(cv_repo)
    if WITH_GUI:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/plottool.git'])
        if WITH_QT:
            ibeis_rman.add_repos(['https://github.com/WildbookOrg/guitool.git'])
            tpl_rman.add_repo(ut.Repo(modname=('PyQt4', 'PyQt5', 'PyQt')))
    if WITH_CUSTOM_TPL:
        flann_repo = ut.Repo('https://github.com/WildbookOrg/flann.git', CODE_DIR, modname='pyflann')
        ibeis_rman.add_repo(flann_repo)
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/hesaff.git'])
    if WITH_CNN:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis_cnn.git', 'https://github.com/WildbookOrg/pydarknet.git', 'https://gitlab.com/bluemellophone/lightnet.git', 'https://gitlab.com/bluemellophone/brambox.git'])
        tpl_rman.add_repos(['https://github.com/pytorch/pytorch.git'])
        tpl_rman.add_repos(['https://github.com/Theano/libgpuarray.git'])
        tpl_rman.add_repos(['https://github.com/Theano/Theano.git', 'https://github.com/Lasagne/Lasagne.git'])
    if WITH_PLUGINS:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis-flukematch-module.git', 'https://github.com/WildbookOrg/ibeis-curvrank-module.git', 'https://github.com/WildbookOrg/ibeis-deepsense-module.git', 'https://github.com/WildbookOrg/ibeis-finfindr-module.git', 'https://github.com/WildbookOrg/ibeis-kaggle7-module.git', 'https://github.com/WildbookOrg/pyrf.git'])
    if False:
        ibeis_rman.add_repos([])
    ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis.git'])
    define_custom_scripts(tpl_rman, ibeis_rman, PY2, PY3)
    return (tpl_rman, ibeis_rman)
def initialize_repo_managers(CODE_DIR, pythoncmd, PY2, PY3):
    import utool as ut
    WITH_CNN = True
    WITH_QT = (not ut.get_argflag('--no-qt'))
    WITH_GUI = (not ut.get_argflag('--no-gui'))
    WITH_CUSTOM_TPL = True
    WITH_PLUGINS = True
    ibeis_rman = ut.RepoManager(['https://github.com/WildbookOrg/utool.git', 'https://github.com/WildbookOrg/vtool.git', 'https://github.com/WildbookOrg/dtool.git', 'https://github.com/Erotemic/ubelt.git', 'https://github.com/WildbookOrg/detecttools.git'], CODE_DIR, label='core', pythoncmd=pythoncmd)
    tpl_rman = ut.RepoManager([], CODE_DIR, label='tpl', pythoncmd=pythoncmd)
    if (not GET_ARGFLAG('--ignore-opencv')):
        cv_repo = ut.Repo('https://github.com/Itseez/opencv.git', CODE_DIR, modname='cv2')
        tpl_rman.add_repo(cv_repo)
    if WITH_GUI:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/plottool.git'])
        if WITH_QT:
            ibeis_rman.add_repos(['https://github.com/WildbookOrg/guitool.git'])
            tpl_rman.add_repo(ut.Repo(modname=('PyQt4', 'PyQt5', 'PyQt')))
    if WITH_CUSTOM_TPL:
        flann_repo = ut.Repo('https://github.com/WildbookOrg/flann.git', CODE_DIR, modname='pyflann')
        ibeis_rman.add_repo(flann_repo)
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/hesaff.git'])
    if WITH_CNN:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis_cnn.git', 'https://github.com/WildbookOrg/pydarknet.git', 'https://gitlab.com/bluemellophone/lightnet.git', 'https://gitlab.com/bluemellophone/brambox.git'])
        tpl_rman.add_repos(['https://github.com/pytorch/pytorch.git'])
        tpl_rman.add_repos(['https://github.com/Theano/libgpuarray.git'])
        tpl_rman.add_repos(['https://github.com/Theano/Theano.git', 'https://github.com/Lasagne/Lasagne.git'])
    if WITH_PLUGINS:
        ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis-flukematch-module.git', 'https://github.com/WildbookOrg/ibeis-curvrank-module.git', 'https://github.com/WildbookOrg/ibeis-deepsense-module.git', 'https://github.com/WildbookOrg/ibeis-finfindr-module.git', 'https://github.com/WildbookOrg/ibeis-kaggle7-module.git', 'https://github.com/WildbookOrg/pyrf.git'])
    if False:
        ibeis_rman.add_repos([])
    ibeis_rman.add_repos(['https://github.com/WildbookOrg/ibeis.git'])
    define_custom_scripts(tpl_rman, ibeis_rman, PY2, PY3)
    return (tpl_rman, ibeis_rman)