Simplify installation instruction in contributing file (#87460)

Simplification of one of the installation instructions in CONTRIBUTING.md that I found tricky to parse at first.

Also adds a link to the "Make no-op build fast" section to make it easier to navigate to.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/87460
Approved by: https://github.com/ngimel
This commit is contained in:
Cameron Voisey 2022-10-26 21:34:13 +00:00 committed by PyTorch MergeBot
parent adb76ef510
commit 1522946882

View File

@ -118,21 +118,9 @@ git submodule sync --recursive
git submodule update --init --recursive --jobs 0
```
If you want to have no-op incremental rebuilds (which are fast), see the section below titled "Make no-op build fast."
If you want to have no-op incremental rebuilds (which are fast), see [Make no-op build fast](#make-no-op-build-fast) below.
3. Follow the instructions for [installing PyTorch from source](https://github.com/pytorch/pytorch#from-source), except when it's time to install PyTorch instead of invoking `setup.py install` you'll want to call `setup.py develop` instead:
Specifically, the change you have to make is to replace
```bash
python setup.py install
```
with
```bash
python setup.py develop
```
3. Follow the instructions for [installing PyTorch from source](https://github.com/pytorch/pytorch#from-source), but instead of installing PyTorch via `python setup.py install`, use `python setup.py develop`.
This mode will symlink the Python files from the current local source
tree into the Python install. This way when you modify a Python file, you