require_version¶
- paddle.utils. require_version ( min_version, max_version=None ) [source]
- 
         Check if the installed version of PaddlePaddle is in [min_version, max_version], if the installed version is lower than min_versionor higher thanmax_version, an exception will be thrown, NO returns if the installed version is satisfied.- Parameters
- 
           - min_version (str) – the minimum version required (like ‘1.4.0’). 
- max_version (str, optional) – the max version required (like ‘1.6.0’), default is None, meaning any version equal or higher than - min_versionis acceptable.
 
- Returns
- 
           None. 
- Raises
- 
           - TypeError – if the type of - min_versionis not str.
- TypeError – if the type of - max_versionis not str or type(None).
- ValueError – if the value of - min_versionis not in version format.
- ValueError – if the value of - max_versionis not in version format or None.
- Exception – if the installed version is lower than - min_versionor higher than- max_version.
 
 Examples import paddle.fluid as fluid # any version >= 0.1.0 is acceptable. fluid.require_version('0.1.0') # if 0.1.0 <= version <= 10.0.0, it is acceptable. fluid.require_version(min_version='0.1.0', max_version='10.0.0') 
