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

Fail to install on CUDA11.3, torch1.12.1 #1515

Open
luyifan233 opened this issue Oct 24, 2022 · 2 comments
Open

Fail to install on CUDA11.3, torch1.12.1 #1515

luyifan233 opened this issue Oct 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@luyifan233
Copy link

luyifan233 commented Oct 24, 2022

Describe the Bug
after running the cmd pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
it drops FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'

Minimal Steps/Code to Reproduce the Bug

pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Using pip 22.3 from /home/xxx/.local/lib/python3.9/site-packages/pip (python 3.9)
Defaulting to user installation because normal site-packages is not writeable
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 pypa/pip#11453
Processing /home/xxx/data/anaconda3/bin/apex
Running command python setup.py egg_info
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home/xxx/data/anaconda3/bin/apex/setup.py", line 137, in
_, bare_metal_version = get_cuda_bare_metal_version(CUDA_HOME)
File "/home/xxx/data/anaconda3/bin/apex/setup.py", line 17, in get_cuda_bare_metal_version
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'

torch.version = 1.10.0+cu102

error: subprocess-exited-with-error

× python setup.py egg_info 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: /usr/bin/python3 -c '
exec(compile('"'"''"'"''"'"'
# This is -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from distutils.core to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so
# setuptools doesn'"'"'t think the script is -c. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute setup.py since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)

file = %r
sys.argv[0] = file

if os.path.exists(file):
filename = file
with tokenize.open(file) as f:
setup_py_code = f.read()
else:
filename = ""
setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/home/xxx/data/anaconda3/bin/apex/setup.py'"'"',), "", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-qpv_iviv
cwd: /home/xxx/data/anaconda3/bin/apex/
Preparing metadata (setup.py) ... 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.

Environment
Ubuntu 18.04.6 , CUDA11.3 , PyTorch 1.12.1 ,python3.9

@luyifan233 luyifan233 added the bug Something isn't working label Oct 24, 2022
@JoeZy2236
Copy link

You can reiterate CUDA_HOME in front of the code

@zp2459
Copy link

zp2459 commented Mar 3, 2023

Describe the Bug after running the cmd pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ it drops FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'

Minimal Steps/Code to Reproduce the Bug

pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Using pip 22.3 from /home/xxx/.local/lib/python3.9/site-packages/pip (python 3.9) Defaulting to user installation because normal site-packages is not writeable 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 pypa/pip#11453 Processing /home/xxx/data/anaconda3/bin/apex Running command python setup.py egg_info Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/home/xxx/data/anaconda3/bin/apex/setup.py", line 137, in _, bare_metal_version = get_cuda_bare_metal_version(CUDA_HOME) File "/home/xxx/data/anaconda3/bin/apex/setup.py", line 17, in get_cuda_bare_metal_version raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True) File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/cuda/bin/bin/nvcc'

torch.version = 1.10.0+cu102

error: subprocess-exited-with-error

× python setup.py egg_info 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: /usr/bin/python3 -c ' exec(compile('"'"''"'"''"'"' # This is -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from distutils.core to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so # setuptools doesn'"'"'t think the script is -c. This avoids the following warning: # manifest_maker: standard file '"'"'-c'"'"' not found". # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/home/xxx/data/anaconda3/bin/apex/setup.py'"'"',), "", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-qpv_iviv cwd: /home/xxx/data/anaconda3/bin/apex/ Preparing metadata (setup.py) ... 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.

Environment Ubuntu 18.04.6 , CUDA11.3 , PyTorch 1.12.1 ,python3.9

same error, have you solved it ? pls give me some ideas

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

3 participants