mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Removing conda references from PyTorch Docs (#152702)
Addresses #148339 Pull Request resolved: https://github.com/pytorch/pytorch/pull/152702 Approved by: https://github.com/svekars, https://github.com/albanD, https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
05bc78e64f
commit
996c4d803d
@ -112,8 +112,7 @@ source venv/bin/activate # or `& .\venv\Scripts\Activate.ps1` on Windows
|
||||
lazy.)
|
||||
|
||||
```bash
|
||||
conda uninstall pytorch -y
|
||||
yes | pip uninstall torch
|
||||
pip uninstall torch
|
||||
```
|
||||
|
||||
Next run `python setup.py clean`. After that, you can install in `develop` mode again.
|
||||
@ -180,14 +179,6 @@ You can use this script to check out a new nightly branch with the following:
|
||||
source venv/bin/activate # or `& .\venv\Scripts\Activate.ps1` on Windows
|
||||
```
|
||||
|
||||
Or if you would like to re-use an existing conda environment, you can pass in
|
||||
the prefix argument (`--prefix`):
|
||||
|
||||
```bash
|
||||
./tools/nightly.py checkout -b my-nightly-branch -p my-env
|
||||
source my-env/bin/activate # or `& .\my-env\Scripts\Activate.ps1` on Windows
|
||||
```
|
||||
|
||||
To install the nightly binaries built with CUDA, you can pass in the flag `--cuda`:
|
||||
|
||||
```bash
|
||||
@ -289,7 +280,7 @@ dependencies as well as the nightly binaries into the repo directory.
|
||||
### Python Unit Testing
|
||||
|
||||
**Prerequisites**:
|
||||
The following packages should be installed with either `conda` or `pip`:
|
||||
The following packages should be installed with `pip`:
|
||||
- `expecttest` and `hypothesis` - required to run tests
|
||||
- `mypy` - recommended for linting
|
||||
- `pytest` - recommended to run tests more selectively
|
||||
@ -497,8 +488,7 @@ pip install -r requirements.txt
|
||||
# Or if you prefer an uncontaminated global executable environment or do not want to go through the node configuration:
|
||||
# npm install katex && export PATH="$PATH:$(pwd)/node_modules/.bin"
|
||||
```
|
||||
> Note: if you installed `nodejs` with a different package manager (e.g.,
|
||||
`conda`) then `npm` will probably install a version of `katex` that is not
|
||||
> Note: if you installed `nodejs` with a different package manager then `npm` will probably install a version of `katex` that is not
|
||||
compatible with your version of `nodejs` and doc builds will fail.
|
||||
A combination of versions that is known to work is `node@6.13.1` and
|
||||
`katex@0.13.18`. To install the latter with `npm` you can run
|
||||
@ -670,13 +660,13 @@ you run `import torch` anywhere else, the development version will be
|
||||
used).
|
||||
|
||||
If you want to manage multiple builds of PyTorch, you can make use of
|
||||
[conda environments](https://conda.io/docs/using/envs.html) to maintain
|
||||
[venv environments](https://docs.python.org/3/library/venv.html) to maintain
|
||||
separate Python package environments, each of which can be tied to a
|
||||
specific build of PyTorch. To set one up:
|
||||
|
||||
```bash
|
||||
conda create -n pytorch-myfeature
|
||||
source activate pytorch-myfeature
|
||||
python -m venv pytorch-myfeature
|
||||
source pytorch-myfeature/bin/activate # or `& .\pytorch-myfeature\Scripts\Activate.ps1` on Windows
|
||||
# if you run python now, torch will NOT be installed
|
||||
python setup.py develop
|
||||
```
|
||||
@ -754,7 +744,6 @@ same. Using ccache in a situation like this is a real time-saver.
|
||||
Before building pytorch, install ccache from your package manager of choice:
|
||||
|
||||
```bash
|
||||
conda install ccache -c conda-forge
|
||||
sudo apt install ccache
|
||||
sudo yum install ccache
|
||||
brew install ccache
|
||||
@ -1046,8 +1035,7 @@ than Linux, which are worth keeping in mind when fixing these problems.
|
||||
|
||||
3. If you have a Windows box (we have a few on EC2 which you can request access to) and
|
||||
you want to run the build, the easiest way is to just run `.ci/pytorch/win-build.sh`.
|
||||
If you need to rebuild, run `REBUILD=1 .ci/pytorch/win-build.sh` (this will avoid
|
||||
blowing away your Conda environment.)
|
||||
If you need to rebuild, run `REBUILD=1 .ci/pytorch/win-build.sh`.
|
||||
|
||||
Even if you don't know anything about MSVC, you can use cmake to build simple programs on
|
||||
Windows; this can be helpful if you want to learn more about some peculiar linking behavior
|
||||
@ -1264,7 +1252,7 @@ in the meantime there will be some separation.
|
||||
There are a few "unusual" directories which, for historical reasons,
|
||||
are Caffe2/PyTorch specific. Here they are:
|
||||
|
||||
- `CMakeLists.txt`, `Makefile`, `binaries`, `cmake`, `conda`, `modules`,
|
||||
- `CMakeLists.txt`, `Makefile`, `binaries`, `cmake`, `modules`,
|
||||
`scripts` are Caffe2-specific. Don't put PyTorch code in them without
|
||||
extra coordination.
|
||||
|
||||
|
Reference in New Issue
Block a user