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

Installation Error. #497

Open
chunyuanY opened this issue Sep 19, 2019 · 2 comments
Open

Installation Error. #497

chunyuanY opened this issue Sep 19, 2019 · 2 comments

Comments

@chunyuanY
Copy link

chunyuanY commented Sep 19, 2019

I used the command pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ but encountered the following error:
`/root/miniconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py:243: 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-q0g0i9bl
Created temporary directory: /tmp/pip-req-tracker-qehxo0ep
Created requirements tracker '/tmp/pip-req-tracker-qehxo0ep'
Created temporary directory: /tmp/pip-install-6fgmp1az
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Processing /root/apex
Created temporary directory: /tmp/pip-req-build-727s_v0k
Added file:///root/apex to build tracker '/tmp/pip-req-tracker-qehxo0ep'
Running setup.py (path:/tmp/pip-req-build-727s_v0k/setup.py) egg_info for package from file:///root/apex
Running command python setup.py egg_info
torch.version = 1.2.0+cu92
running egg_info
creating pip-egg-info/apex.egg-info
writing pip-egg-info/apex.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/apex.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/apex.egg-info/top_level.txt
writing manifest file 'pip-egg-info/apex.egg-info/SOURCES.txt'
reading manifest file 'pip-egg-info/apex.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/apex.egg-info/SOURCES.txt'
/tmp/pip-req-build-727s_v0k/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-727s_v0k has version 0.1, which satisfies requirement apex==0.1 from file:///root/apex
Removed apex==0.1 from file:///root/apex from build tracker '/tmp/pip-req-tracker-qehxo0ep'
Skipping bdist_wheel for apex, due to binaries being disabled for it.
Installing collected packages: apex
Created temporary directory: /tmp/pip-record-gh0y8s0z
Running command /root/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-727s_v0k/setup.py'"'"'; file='"'"'/tmp/pip-req-build-727s_v0k/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-gh0y8s0z/install-record.txt --single-version-externally-managed --compile
torch.version = 1.2.0+cu92
/tmp/pip-req-build-727s_v0k/setup.py:43: UserWarning: Option --pyprof not specified. Not installing PyProf dependencies!
warnings.warn("Option --pyprof not specified. Not installing PyProf dependencies!")

Compiling cuda extensions with
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
from /usr/local/cuda/bin

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-727s_v0k/setup.py", line 100, in <module>
    check_cuda_torch_binary_vs_bare_metal(torch.utils.cpp_extension.CUDA_HOME)
  File "/tmp/pip-req-build-727s_v0k/setup.py", line 77, in check_cuda_torch_binary_vs_bare_metal
    "https://github.com/NVIDIA/apex/pull/323#discussion_r287021798.  "
RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries.  Pytorch binaries were compiled with Cuda 9.2.148.
In some cases, a minor-version mismatch will not cause later errors:  https://github.com/NVIDIA/apex/pull/323#discussion_r287021798.  You can try commenting out this check (at your own risk).

Running setup.py install for apex ... error
Cleaning up...
Removing source in /tmp/pip-req-build-727s_v0k
Removed build tracker '/tmp/pip-req-tracker-qehxo0ep'
ERROR: Command errored out with exit status 1: /root/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-727s_v0k/setup.py'"'"'; file='"'"'/tmp/pip-req-build-727s_v0k/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-gh0y8s0z/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 188, in main
status = self.run(options, args)
File "/root/miniconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 407, in run
use_user_site=options.use_user_site,
File "/root/miniconda3/lib/python3.7/site-packages/pip/_internal/req/init.py", line 58, in install_given_reqs
**kwargs
File "/root/miniconda3/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 959, in install
spinner=spinner,
File "/root/miniconda3/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 931, in call_subprocess
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /root/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-727s_v0k/setup.py'"'"'; file='"'"'/tmp/pip-req-build-727s_v0k/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-gh0y8s0z/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
1 location(s) to search for versions of pip:

@chunyuanY chunyuanY reopened this Sep 19, 2019
@ptrblck
Copy link
Contributor

ptrblck commented Sep 19, 2019

Hi @chunyuanY,

the raised error is:

RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries. Pytorch binaries were compiled with Cuda 9.2.148.
In some cases, a minor-version mismatch will not cause later errors: #323 (comment). You can try commenting out this check (at your own risk).

It's recommended to install the matching CUDA version as used in the PyTorch binaries.
Alternatively, you could install the PyTorch binaries with CUDA10.0 and remove the minor version check as described in the error message.

@Bin-ze
Copy link

Bin-ze commented Mar 1, 2023

I use cu113+torch12.0.1, and installed dependencies, but an error occurs when importing vren:
vren.cpython-38-x86_64-linux-gnu.so: undefined symbol: _zn2at4_ops5zeros4callen3c108arrayrefins2_6syminteeens2_8optionalins2_10scalartypeeeens6_ins2_6layouteeens6_ins2_6deviceeeens6_ibee >>>
Can anyone tell me how to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants