find_package(PythonInterp 3.6 REQUIRED)
find_package(PythonLibs 3.6)
- if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3)
- message(FATAL_ERROR
- "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.")
- endif()
+ ## Disable this check as the debian build process ensures the python version to over 3.6
+ ## Further, this check does not get PYTHONLIBS_VERSION_STRING variable for xenial on launchpad
+ # if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3)
+ # message(FATAL_ERROR
+ # "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.")
+ # endif()
# When building pytorch, we pass this in directly from setup.py, and
# don't want to overwrite it because we trust python more than cmake