NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.42k stars 1.4k forks source link

How to install apex #1851

Open Zerycii opened 1 month ago

Zerycii commented 1 month ago

Image I always meet this error.Can someone help me?

akshaypn commented 1 month ago

Hi, I am also facing the exact same issue. Did anyone find a fix?

XYkong-CS commented 1 month ago

It seems you should install "torch" before installing apex.

rensiyingying commented 1 month ago

Hi,Maybe you could try command: pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./

lix19937 commented 1 month ago
git clone https://github.com/NVIDIA/apex
cd apex
# if pip >= 23.1 
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./

# otherwise
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./

And you should make sure your torch cuda version must match the /usr/local/cuda/bin/nvcc

AlongWY commented 3 days ago

try this one 试试这个?apex wheels

zslefour commented 3 days ago

try this one 试试这个?apex wheels

Is there a version that supports Windows?

gontz commented 1 day ago

try this one 试试这个?apex wheels

Is there a version that supports Windows?

Only Linux

rzw520 commented 16 hours ago

DEPRECATION: --build-option and --global-option are deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to use --config-settings. Discussion can be found at https://github.com/pypa/pip/issues/11859 WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option.