Open CodingQinghao opened 3 years ago
https://github.com/NVIDIA/apex/issues/802#issuecomment-618699214 you can try this. I have the same error of "subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1." Using that method, error is gone.
python 3.7.11 nvcc: 11.1, V11.1.74 Build cuda_11.1.TC455_06.29069683_0 pytorch:1.8.0+cu111 cudnn:8005 RTX3090
(python37) ldf@ldf-virtual-machine:~/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex$ pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ /home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/commands/install.py:232: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. cmdoptions.check_install_build_global(options) Using pip 21.1.3 from /home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip (python 3.7) Non-user install because site-packages writeable Created temporary directory: /tmp/pip-ephem-wheel-cache-acyf4cju Created temporary directory: /tmp/pip-req-tracker-g3jio7ce Initialized build tracking at /tmp/pip-req-tracker-g3jio7ce Created build tracker: /tmp/pip-req-tracker-g3jio7ce Entered build tracker: /tmp/pip-req-tracker-g3jio7ce Created temporary directory: /tmp/pip-install-o7l35dfi Processing /home/ldf/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex Created temporary directory: /tmp/pip-req-build-yrmgdjcg DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555. Added file:///home/ldf/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex to build tracker '/tmp/pip-req-tracker-g3jio7ce' Running setup.py (path:/tmp/pip-req-build-yrmgdjcg/setup.py) egg_info for package from file:///home/ldf/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex Created temporary directory: /tmp/pip-pip-egg-info-k90g18cg Running command python setup.py egg_info
Source in /tmp/pip-req-build-yrmgdjcg has version 0.1, which satisfies requirement apex==0.1 from file:///home/ldf/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex Removed apex==0.1 from file:///home/ldf/.jupyter/qinghao/PanGu/panguAlpha_pytorch/apex from build tracker '/tmp/pip-req-tracker-g3jio7ce' Created temporary directory: /tmp/pip-unpack-beggjimo Skipping wheel build for apex, due to binaries being disabled for it. Installing collected packages: apex Created temporary directory: /tmp/pip-record-wrkwo_pg Running command /home/ldf/anaconda3/envs/python37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yrmgdjcg/setup.py'"'"'; file='"'"'/tmp/pip-req-build-yrmgdjcg/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-wrkwo_pg/install-record.txt --single-version-externally-managed --compile --install-headers /home/ldf/anaconda3/envs/python37/include/python3.7m/apex
ERROR: Command errored out with exit status 1: /home/ldf/anaconda3/envs/python37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yrmgdjcg/setup.py'"'"'; file='"'"'/tmp/pip-req-build-yrmgdjcg/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-wrkwo_pg/install-record.txt --single-version-externally-managed --compile --install-headers /home/ldf/anaconda3/envs/python37/include/python3.7m/apex Check the logs for full command output. Exception information: Traceback (most recent call last): File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 825, in install req_description=str(self.req), File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/operations/install/legacy.py", line 81, in install raise LegacyInstallFailure pip._internal.operations.install.legacy.LegacyInstallFailure
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 180, in _main status = self.run(options, args) File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper return func(self, options, args) File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 402, in run pycompile=options.compile, File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/req/init.py", line 85, in install_given_reqs pycompile=pycompile, File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 829, in install six.reraise(*exc.parent) File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_vendor/six.py", line 703, in reraise raise value File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/operations/install/legacy.py", line 71, in install cwd=unpacked_source_directory, File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 278, in runner spinner=spinner, File "/home/ldf/anaconda3/envs/python37/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 244, in call_subprocess raise InstallationSubprocessError(proc.returncode, command_desc) pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /home/ldf/anaconda3/envs/python37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yrmgdjcg/setup.py'"'"'; file='"'"'/tmp/pip-req-build-yrmgdjcg/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-wrkwo_pg/install-record.txt --single-version-externally-managed --compile --install-headers /home/ldf/anaconda3/envs/python37/include/python3.7m/apex Check the logs for full command output. Removed build tracker: '/tmp/pip-req-tracker-g3jio7ce'