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

[ INSTALLATION ] - Not able to install apex on a Linux machine #1799

Open MBadriNarayanan opened 7 months ago

MBadriNarayanan commented 7 months ago

I am facing the following issue while installing apex

Error

Using pip 22.3.1 from /home/group5/anaconda3/lib/python3.10/site-packages/pip (python 3.10) WARNING: Implying --no-binary=:all: due to the presence of --build-option / --global-option / --install-option. Consider using --config-settings for more flexibility. DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453 Processing /home/group5/CS744/Project/apex Running command Preparing metadata (pyproject.toml)

Warning: Torch did not find available GPUs on this system. If your intention is to cross-compile, this is not an error. By default, Apex will cross-compile for Pascal (compute capabilities 6.0, 6.1, 6.2), Volta (compute capability 7.0), Turing (compute capability 7.5), and, if the CUDA version is >= 11.0, Ampere (compute capability 8.0). If you wish to cross-compile for a single specific architecture, export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.

torch.version = 2.3.0

Traceback (most recent call last): File "/home/group5/anaconda3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in main() File "/home/group5/anaconda3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/group5/anaconda3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/home/group5/anaconda3/lib/python3.10/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel self.run_setup() File "/home/group5/anaconda3/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, 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/group5/anaconda3/bin/python /home/group5/anaconda3/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_jnyrrpl cwd: /home/group5/CS744/Project/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.

Steps to Reproduce the Error

Environment

Cuda Toolkit Version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0

Python

Python 3.10.14

Conda

conda 23.3.1

Packages Installed

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
anaconda-client           1.11.2          py310h06a4308_0  
anaconda-navigator        2.4.0           py310h06a4308_0  
anaconda-project          0.11.1          py310h06a4308_0  
attrs                     23.1.0          py310h06a4308_0  
backports                 1.1                pyhd3eb1b0_0  
backports.functools_lru_cache 1.6.4              pyhd3eb1b0_0  
backports.tempfile        1.0                pyhd3eb1b0_1  
backports.weakref         1.0.post1                  py_1  
beautifulsoup4            4.12.2          py310h06a4308_0  
blas                      1.0                         mkl  
boltons                   23.0.0          py310h06a4308_0  
brotli-python             1.0.9           py310h6a678d5_7  
bzip2                     1.0.8                h5eee18b_5  
ca-certificates           2024.3.11            h06a4308_0  
certifi                   2024.2.2        py310h06a4308_0  
cffi                      1.16.0          py310h5eee18b_0  
chardet                   4.0.0           py310h06a4308_1003  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
click                     8.1.7           py310h06a4308_0  
clyent                    1.2.2           py310h06a4308_1  
conda                     23.3.1          py310h06a4308_0  
conda-build               3.24.0          py310h06a4308_0  
conda-content-trust       0.1.3           py310h06a4308_0  
conda-pack                0.6.0              pyhd3eb1b0_0  
conda-package-handling    2.0.2           py310h06a4308_0  
conda-package-streaming   0.7.0           py310h06a4308_0  
conda-repo-cli            1.0.88          py310h06a4308_0  
conda-token               0.4.0              pyhd3eb1b0_0  
conda-verify              3.4.2                      py_1  
cryptography              42.0.5          py310hdda0065_0  
cudatoolkit               11.3.1               h2bc3f7f_2  
cyrus-sasl                2.1.28               h52b45da_1  
dbus                      1.13.18              hb2f20db_0  
defusedxml                0.7.1              pyhd3eb1b0_0  
expat                     2.6.2                h6a678d5_0  
ffmpeg                    4.3                  hf484d3e_0    pytorch
filelock                  3.13.1          py310h06a4308_0  
fontconfig                2.14.1               h4c34cd2_2  
freetype                  2.12.1               h4a9f257_0  
future                    0.18.3          py310h06a4308_0  
glib                      2.78.4               h6a678d5_0  
glib-tools                2.78.4               h6a678d5_0  
glob2                     0.7                pyhd3eb1b0_0  
gmp                       6.2.1                h295c915_3  
gmpy2                     2.1.2           py310heeb90bb_0  
gnutls                    3.6.15               he1e5248_0  
gst-plugins-base          1.14.1               h6a678d5_1  
gstreamer                 1.14.1               h5eee18b_1  
icu                       73.1                 h6a678d5_0  
idna                      3.4             py310h06a4308_0  
intel-openmp              2023.1.0         hdb19cb5_46306  
jinja2                    3.1.3           py310h06a4308_0  
joblib                    1.4.0           py310h06a4308_0  
jpeg                      9e                   h5eee18b_1  
jsonpatch                 1.33            py310h06a4308_0  
jsonpointer               2.1                pyhd3eb1b0_0  
jsonschema                4.19.2          py310h06a4308_0  
jsonschema-specifications 2023.7.1        py310h06a4308_0  
jupyter_core              5.5.0           py310h06a4308_0  
krb5                      1.20.1               h143b758_1  
lame                      3.100                h7b6447c_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.38                 h1181459_1  
lerc                      3.0                  h295c915_0  
libarchive                3.6.2                h6ac8c49_2  
libclang                  14.0.6          default_hc6dbbc7_1  
libclang13                14.0.6          default_he11475f_1  
libcups                   2.4.2                h2d74bed_1  
libdeflate                1.17                 h5eee18b_1  
libedit                   3.1.20230828         h5eee18b_0  
libffi                    3.4.4                h6a678d5_0  
libgcc-ng                 11.2.0               h1234567_1  
libglib                   2.78.4               hdc74915_0  
libgomp                   11.2.0               h1234567_1  
libiconv                  1.16                 h7f8727e_2  
libidn2                   2.3.4                h5eee18b_0  
libjpeg-turbo             2.0.0                h9bf148f_0    pytorch
liblief                   0.12.3               h6a678d5_0  
libllvm14                 14.0.6               hdb19cb5_3  
libpng                    1.6.39               h5eee18b_0  
libpq                     12.17                hdbd6064_0  
libstdcxx-ng              11.2.0               h1234567_1  
libtasn1                  4.19.0               h5eee18b_0  
libtiff                   4.5.1                h6a678d5_0  
libunistring              0.9.10               h27cfd23_0  
libuuid                   1.41.5               h5eee18b_0  
libwebp-base              1.3.2                h5eee18b_0  
libxcb                    1.15                 h7f8727e_0  
libxkbcommon              1.0.1                h5eee18b_1  
libxml2                   2.10.4               hfdd30dd_2  
llvm-openmp               14.0.6               h9e868ea_0  
lz4-c                     1.9.4                h6a678d5_0  
markupsafe                2.1.3           py310h5eee18b_0  
mkl                       2023.1.0         h213fc3f_46344  
mkl-service               2.4.0           py310h5eee18b_1  
mkl_fft                   1.3.8           py310h5eee18b_0  
mkl_random                1.2.4           py310hdb19cb5_0  
mpc                       1.1.0                h10f8cd9_1  
mpfr                      4.0.2                hb69a4c5_1  
mpmath                    1.3.0           py310h06a4308_0  
mysql                     5.7.24               h721c034_2  
navigator-updater         0.5.0           py310h06a4308_0  
nbformat                  5.9.2           py310h06a4308_0  
ncurses                   6.4                  h6a678d5_0  
nettle                    3.7.3                hbbd107a_1  
networkx                  3.1             py310h06a4308_0  
nltk                      3.8.1           py310h06a4308_0    anaconda
numpy                     1.26.4          py310h5f9d8c6_0  
numpy-base                1.26.4          py310hb5e798b_0  
openh264                  2.1.1                h4ff587b_0  
openjpeg                  2.4.0                h3ad879b_0  
openssl                   3.0.13               h7f8727e_0  
packaging                 23.2            py310h06a4308_0  
patch                     2.7.6             h7b6447c_1001  
patchelf                  0.17.2               h6a678d5_0  
pcre2                     10.42                hebb0a14_0  
pillow                    10.2.0          py310h5eee18b_0  
pip                       22.3.1          py310h06a4308_0  
pkginfo                   1.9.6           py310h06a4308_0  
platformdirs              3.10.0          py310h06a4308_0  
pluggy                    1.0.0           py310h06a4308_1  
ply                       3.11            py310h06a4308_0  
psutil                    5.9.0           py310h5eee18b_0  
py-lief                   0.12.3          py310h6a678d5_0  
pycosat                   0.6.6           py310h5eee18b_0  
pycparser                 2.21               pyhd3eb1b0_0  
pyjwt                     2.4.0           py310h06a4308_0  
pyopenssl                 24.0.0          py310h06a4308_0  
pyqt                      5.15.10         py310h6a678d5_0  
pyqt5-sip                 12.13.0         py310h5eee18b_0  
pysocks                   1.7.1           py310h06a4308_0  
python                    3.10.14              h955ad1f_0  
python-dateutil           2.8.2              pyhd3eb1b0_0  
python-fastjsonschema     2.16.2          py310h06a4308_0  
python-libarchive-c       2.9                pyhd3eb1b0_1  
pytorch                   2.3.0              py3.10_cpu_0    pytorch
pytorch-mutex             1.0                         cpu    pytorch
pytz                      2024.1          py310h06a4308_0  
pyyaml                    6.0.1           py310h5eee18b_0  
qt-main                   5.15.2              h53bd1ea_10  
qtpy                      2.4.1           py310h06a4308_0  
readline                  8.2                  h5eee18b_0  
referencing               0.30.2          py310h06a4308_0  
regex                     2023.10.3       py310h5eee18b_0  
requests                  2.31.0          py310h06a4308_1  
requests-toolbelt         1.0.0           py310h06a4308_0  
ripgrep                   13.0.0               h241b6ea_2  
rpds-py                   0.10.6          py310hb02cf49_0  
ruamel.yaml               0.17.21         py310h5eee18b_0  
ruamel.yaml.clib          0.2.6           py310h5eee18b_1  
ruamel_yaml               0.17.21         py310h5eee18b_0  
setuptools                65.6.3          py310h06a4308_0  
sip                       6.7.12          py310h6a678d5_0  
six                       1.16.0             pyhd3eb1b0_1  
soupsieve                 2.5             py310h06a4308_0  
sqlite                    3.41.2               h5eee18b_0  
sympy                     1.12            py310h06a4308_0  
tbb                       2021.8.0             hdb19cb5_0  
tk                        8.6.12               h1ccaba5_0  
tomli                     2.0.1           py310h06a4308_0  
toolz                     0.12.0          py310h06a4308_0  
torchaudio                2.3.0                 py310_cpu    pytorch
torchvision               0.18.0                py310_cpu    pytorch
tornado                   6.3.3           py310h5eee18b_0  
tqdm                      4.65.0          py310h2f386ee_0  
traitlets                 5.7.1           py310h06a4308_0  
typing_extensions         4.9.0           py310h06a4308_1  
tzdata                    2024a                h04d1e81_0  
ujson                     5.4.0           py310h6a678d5_0  
urllib3                   2.1.0           py310h06a4308_1  
wheel                     0.38.4          py310h06a4308_0  
xz                        5.4.6                h5eee18b_0  
yaml                      0.2.5                h7b6447c_0  
zlib                      1.2.13               h5eee18b_0  
zstandard                 0.19.0          py310h5eee18b_0  
zstd                      1.5.5                hc292b87_0 
54108 commented 6 months ago

same error

JoishB commented 5 months ago

same error

AlongWY commented 6 days ago

try this one 试试这个?apex wheels