If I’m not mistaken, the mentioned CMAKE_PREFIX_PATH makes sure to use the current conda environment, so if you are fine with a system wide installation, you could probably skip this step.
In the pytorch directory, you could run pip install -v . to install pytorch via pip.
(Note the last dot in the command!  )