Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ssaral opened this issue Aug 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ssaral
Copy link

ssaral commented Aug 15, 2024

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 ssaral added the bug Something isn't working label Aug 15, 2024
@ssaral
Copy link
Author

ssaral commented Aug 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant