Unsuccessful installation of apex library. (Preparing metadata (pyproject.toml) did not run successfully.)
Describe the Bug
While installing apex library in conda virtual env, I am getting the following mentioned error:
Using pip 24.2 from /home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/pip (python 3.10) Processing /home/saral/common_base/apex Running command Preparing metadata (pyproject.toml)
torch.version = 2.4.0+cu121
Traceback (most recent call last):
File "/home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip. full command: /home/saral/common_base/miniconda3/envs/svenv/bin/python /home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp3h78j6xr cwd: /home/saral/common_base/apex Preparing metadata (pyproject.toml) ... error error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. Minimal Steps/Code to Reproduce the Bug
Install torch==2.4.0, numpy==1.26.4, transformers library CUDA version: 12.1/12.2
Environment
Linux 22.04, Python 3.10, PyTorch version: 2.4.0+cu121, conda virtual env setup.
commands used to install apex library: (as mentioned in the README file)
git clone https://github.com/NVIDIA/apex cd apex 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" ./
Were you able to solve the error? facing the same error.
Any solution? Also facing the same error.
try this one 试试这个?apex wheels