check_before_start.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:FLASH 作者: yuyuz 项目源码 文件源码
def _check_modules():
    """Checks whether all dependencies are installed"""

    try:
        import numpy
        if numpy.__version__ < "1.6.0":
            logger.warning("WARNING: You are using a numpy %s < 1.6.0. This "
                           "might not work", numpy.__version__)
    except:
        raise ImportError("Numpy cannot be imported. Are you sure that it's installed?")

    try:
        import scipy
        if scipy.__version__ < "0.12.0":
            logger.warning("WARNING: You are using a scipy %s < 0.12.0. "
                           "This might not work", scipy.__version__)
    except:
        raise ImportError("Scipy cannot be imported. Are you sure that it's installed?")

    try:
        import theano
        logger.debug("\tTheano: %s" % str(theano.__version__))
    except ImportError:
        logger.warning("Theano not found. You might need this to run some "
                       "more complex benchmarks!")

    if 'cuda' not in os.environ['PATH']:
        logger.warning("CUDA not in $PATH")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号