他的回复:
我是按照官方的方案https://github.com/NVIDIA/apex装的,按照您的方案pip install apex似乎没法import。我切换到cuda10之后,运行pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./然后会报错,相关内容为:error: command 'gcc' failed with exit status 1 Running setup.py install for apex ... errorERROR: Command errored out with exit status 1: /opt/conda/envs/torch/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-yu3np5os/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-yu3np5os/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-ng8ntezo/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/envs/torch/include/python3.6m/apex Check the logs for full command output.