switch from preferences to requirements for python,R version (https://github.com/spack/spack/pull/27987)