NVIDIA / NVIDIA/apex

install error when install CUDA &C++ version

Open
#613 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
3

Description

I follow the qiuck-start instructions in the readme, and I can't install the cuda and c++ version.the install full log are floowing:
(torch-gpu) yjlin0223@Ubuntu-16:~/apex$ pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/commands/install.py:283: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Created temporary directory: /tmp/pip-ephem-wheel-cache-gshy96xh
Created temporary directory: /tmp/pip-req-tracker-oac9ek6h
Created requirements tracker '/tmp/pip-req-tracker-oac9ek6h'
Created temporary directory: /tmp/pip-install-i4gydgpu
Processing /home/yjlin0223/apex
Created temporary directory: /tmp/pip-req-build-gwfy4oh7
Added file:///home/yjlin0223/apex to build tracker '/tmp/pip-req-tracker-oac9ek6h'
Running setup.py (path:/tmp/pip-req-build-gwfy4oh7/setup.py) egg_info for package from file:///home/yjlin0223/apex
Running command python setup.py egg_info
torch.version = 1.0.1.post2
running egg_info
creating /tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info
writing /tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/top_level.txt
writing manifest file '/tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-req-build-gwfy4oh7/pip-egg-info/apex.egg-info/SOURCES.txt'
/tmp/pip-req-build-gwfy4oh7/setup.py:43: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies!
warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")
Source in /tmp/pip-req-build-gwfy4oh7 has version 0.1, which satisfies requirement apex==0.1 from file:///home/yjlin0223/apex
Removed apex==0.1 from file:///home/yjlin0223/apex from build tracker '/tmp/pip-req-tracker-oac9ek6h'
Skipping wheel build for apex, due to binaries being disabled for it.
Installing collected packages: apex
Created temporary directory: /tmp/pip-record-entn6l81
Running command /home/yjlin0223/anaconda3/envs/torch-gpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"'; file='"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-entn6l81/install-record.txt --single-version-externally-managed --compile
torch.version = 1.0.1.post2
/tmp/pip-req-build-gwfy4oh7/setup.py:43: 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 "", line 1, in
File "/tmp/pip-req-build-gwfy4oh7/setup.py", line 100, in
check_cuda_torch_binary_vs_bare_metal(torch.utils.cpp_extension.CUDA_HOME)
File "/tmp/pip-req-build-gwfy4oh7/setup.py", line 60, in check_cuda_torch_binary_vs_bare_metal
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ':/usr/local/cuda-10.0/bin/nvcc': ':/usr/local/cuda-10.0/bin/nvcc'
Running setup.py install for apex ... error
Cleaning up...
Removing source in /tmp/pip-req-build-gwfy4oh7
Removed build tracker '/tmp/pip-req-tracker-oac9ek6h'
ERROR: Command errored out with exit status 1: /home/yjlin0223/anaconda3/envs/torch-gpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"'; file='"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-entn6l81/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 455, in run
use_user_site=options.use_user_site,
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/req/init.py", line 62, in install_given_reqs
**kwargs
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 888, in install
cwd=self.unpacked_source_directory,
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/utils/subprocess.py", line 275, in runner
spinner=spinner,
File "/home/yjlin0223/anaconda3/envs/torch-gpu/lib/python3.6/site-packages/pip/_internal/utils/subprocess.py", line 242, in call_subprocess
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/yjlin0223/anaconda3/envs/torch-gpu/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"'; file='"'"'/tmp/pip-req-build-gwfy4oh7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp/pip-record-entn6l81/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
1 location(s) to search for versions of pip:

python 3.6.9,pytorch 1.0.1,cuda 10.0.130

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README quick-start instructions and setup.py, especially the CUDA check reported at lines 60 and 100. Reproduce the installation command in the reported Python, PyTorch, and CUDA environment, then trace the nvcc path handling. Done means the CUDA and C++ installation completes without the shown FileNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, pytorch
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.