mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
update CMAKE_PREFIX_PATH setting command (#134934)
Current setting command of the `CMAKE_PREFIX_PATH` environment variable will overwrite values if it had already been set with some values. Changing it to `:` appends the conda env search path to its values to avoid library not found issues. `export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}:${CMAKE_PREFIX_PATH}` Pull Request resolved: https://github.com/pytorch/pytorch/pull/134934 Approved by: https://github.com/malfet, https://github.com/EikanWang
This commit is contained in:
committed by
PyTorch MergeBot
parent
7db1f0b7b5
commit
ebd60f4074
@ -291,7 +291,7 @@ python tools/amd_build/build_amd.py
|
||||
|
||||
Install PyTorch
|
||||
```bash
|
||||
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
|
||||
export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}"
|
||||
python setup.py develop
|
||||
```
|
||||
|
||||
@ -373,14 +373,14 @@ with such a step.
|
||||
|
||||
On Linux
|
||||
```bash
|
||||
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
|
||||
export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}"
|
||||
python setup.py build --cmake-only
|
||||
ccmake build # or cmake-gui build
|
||||
```
|
||||
|
||||
On macOS
|
||||
```bash
|
||||
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
|
||||
export CMAKE_PREFIX_PATH="${CONDA_PREFIX:-'$(dirname $(which conda))/../'}:${CMAKE_PREFIX_PATH}"
|
||||
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build --cmake-only
|
||||
ccmake build # or cmake-gui build
|
||||
```
|
||||
|
Reference in New Issue
Block a user