title: Error while installing PyTorch using pip - cannot build wheel
body: <p>I get the following output when I try to run <code>pip3 install pytorch</code> or <code>pip install pytorch</code></p>
  <pre><code>Collecting pytorch
    Using cached pytorch-1.0.2.tar.gz (689 bytes)
  Building wheels for collected packages: pytorch
    Building wheel for pytorch (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d /tmp/pip-wheel-8rsdyb8e
         cwd: /tmp/pip-install-3v4wd97t/pytorch/
    Complete output (5 lines):
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;/tmp/pip-install-3v4wd97t/pytorch/setup.py&quot;, line 15, in &lt;module&gt;
        raise Exception(message)
    Exception: You tried to install &quot;pytorch&quot;. The package named for PyTorch is &quot;torch&quot;
    ----------------------------------------
    ERROR: Failed building wheel for pytorch
    Running setup.py clean for pytorch
  Failed to build pytorch
  Installing collected packages: pytorch
      Running setup.py install for pytorch ... error
      ERROR: Command errored out with exit status 1:
       command: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /tmp/pip-record-eld9j0g4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chaitanya/.local/include/python3.8/pytorch
           cwd: /tmp/pip-install-3v4wd97t/pytorch/
      Complete output (5 lines):
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;/tmp/pip-install-3v4wd97t/pytorch/setup.py&quot;, line 11, in &lt;module&gt;
          raise Exception(message)
      Exception: You tried to install &quot;pytorch&quot;. The package named for PyTorch is &quot;torch&quot;
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /home/chaitanya/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-3v4wd97t/pytorch/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /tmp/pip-record-eld9j0g4/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chaitanya/.local/include/python3.8/pytorch Check the logs for full command output.
  </code></pre>
  <p>I downloaded the matching wheel from <a href="https://download.pytorch.org/whl/cpu/torch_stable.html" rel="nofollow noreferrer">here</a>, but am couldn't figure out what to do with it. My Python installation is using anaconda3, if that's needed. What should I do from here? Tips on how I could have resolved this on my own would also be appreciated.</p>