Skip to content

Commit

Permalink
Improve CONTRIBUTING.md (pytorch#58396)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#58396

Test Plan: Imported from OSS

Reviewed By: samestep

Differential Revision: D28476510

Pulled By: ansley

fbshipit-source-id: 3f45bee93dfeda06a44570305f9699bcafc45d2e
  • Loading branch information
Ansley Ussery authored and facebook-github-bot committed May 17, 2021
1 parent 9afe9fb commit e8981e7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,17 @@ https://github.com/pytorch/pytorch#from-source

To develop PyTorch on your machine, here are some tips:

1. Uninstall all existing PyTorch installs:
1. Uninstall all existing PyTorch installs. You may need to run `pip
uninstall torch` multiple times. You'll know `torch` is fully
uninstalled when you see `WARNING: Skipping torch as it is not
installed`. (You should only have to `pip uninstall` a few times, but
you can always `uninstall` with `timeout` or in a loop if you're feeling
lazy.)


```bash
conda uninstall pytorch
pip uninstall torch
pip uninstall torch # run this command twice
conda -y uninstall pytorch
yes | pip uninstall torch
```

2. Clone a copy of PyTorch from source:
Expand Down Expand Up @@ -134,8 +140,10 @@ For example:
You do not need to repeatedly install after modifying Python files (`.py`). However, you would need to reinstall
if you modify Python interface (`.pyi`, `.pyi.in`) or non-Python files (`.cpp`, `.cc`, `.cu`, `.h`, ...).

In case you want to reinstall, make sure that you uninstall PyTorch first by running `pip uninstall torch`
and `python setup.py clean`. Then you can install in `develop` mode again.
In case you want to reinstall, make sure that you uninstall PyTorch
first by running `pip uninstall torch` until you see `WARNING: Skipping
torch as it is not installed`; next run `python setup.py clean`. After
that, you can install in `develop` mode again.

### Tips and Debugging
* A prerequisite to installing PyTorch is CMake. We recommend installing it with [Homebrew](https://brew.sh/)
Expand Down

0 comments on commit e8981e7

Please sign in to comment.