Swin-Transformer icon indicating copy to clipboard operation
Swin-Transformer copied to clipboard

following the readme,the conda env is wrong. when i run :pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Open henbucuoshanghai opened this issue 4 years ago • 2 comments

torch.version = 1.7.0

/tmp/pip-req-build-6uc_tphc/setup.py:67: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies!
  warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-6uc_tphc/setup.py", line 171, in <module>
    check_cuda_torch_binary_vs_bare_metal(torch.utils.cpp_extension.CUDA_HOME)
  File "/tmp/pip-req-build-6uc_tphc/setup.py", line 94, in check_cuda_torch_binary_vs_bare_metal
    raw_output, bare_metal_major, bare_metal_minor = get_cuda_bare_metal_version(cuda_dir)
  File "/tmp/pip-req-build-6uc_tphc/setup.py", line 84, in get_cuda_bare_metal_version
    raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
  File "/homeanaconda3/envs/swin/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/home/anaconda3/envs/swin/lib/python3.7/subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/anaconda3/envs/swin/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/homeanaconda3/envs/swin/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda-11.0/bin/nvcc': ':/usr/local/cuda-11.0/bin/nvcc'
Running setup.py install for apex ... error

ERROR: Command errored out with exit status 1: /home/aipanda/anaconda3/envs/swin/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-6uc_tphc/setup.py'"'"'; file='"'"'/tmp/pip-req-build-6uc_tphc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-xqyiq54w/install-record.txt --single-version-externally-managed --compile --install-headers /home/aipanda/anaconda3/envs/swin/include/python3.7m/apex Check the logs for full command output.

henbucuoshanghai avatar Jul 19 '21 09:07 henbucuoshanghai

my cuda is 11.0 and i have DIr :/usr/local/cuda-11.0/bin/nvcc

what is wrong

henbucuoshanghai avatar Jul 19 '21 09:07 henbucuoshanghai

cd apex python setup.py install try it

tb2-sy avatar Oct 24 '21 03:10 tb2-sy