It is not trivial to compile pytorch on Fedora 26 as the gcc compiler 7.1.1 is not compatible with Cuda 8.0. This note describes a way around this problem.
env CC=/usr/local/gcc-5.4.0/bin/gcc  \
    CXX=/usr/local/gcc-5.4.0/bin/g++ \
    CUDA_NVCC_FLAGS="-ccbin=/usr/local/gcc-5.4.0/bin/g++" \
    python2 setup.py install --prefix=/usr/localPYTHONPATH includes the following two directories:export PYTHONPATH=/usr/local/lib/python2.7/site-packages:\
                  /usr/local/lib64/python2.7/site-packages:ipython2
... import torch
... torch.version.__version__pytorch-vision apply the following path, whereupon pytorch-vision may be installed with a simple python setup.py install.diff --git a/setup.py b/setup.py
index a83d889..d2a16bc 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,6 @@ requirements = [
     'numpy',
     'pillow',
     'six',
-    'torch',
 ]