apex icon indicating copy to clipboard operation
apex copied to clipboard

Unsuccessful installation of apex library. (Preparing metadata (pyproject.toml) did not run successfully.)

Open ssaral opened this issue 1 year ago • 4 comments

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 main() File "/home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/setuptools/build_meta.py", line 368, in prepare_metadata_for_build_wheel self.run_setup() File "/home/saral/common_base/miniconda3/envs/svenv/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup exec(code, locals()) File "", line 137, in File "", line 24, in get_cuda_bare_metal_version TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' error: subprocess-exited-with-error

× 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.

ssaral avatar Aug 15 '24 13:08 ssaral

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" ./

ssaral avatar Aug 15 '24 13:08 ssaral

Were you able to solve the error? facing the same error.

RukaiaAfsana avatar Oct 05 '24 09:10 RukaiaAfsana

Any solution? Also facing the same error.

mik300 avatar Nov 07 '24 16:11 mik300

try this one 试试这个?apex wheels

AlongWY avatar Nov 20 '24 05:11 AlongWY