无法在 Windows 上安装 NVIDIA apex
Posted
技术标签:
【中文标题】无法在 Windows 上安装 NVIDIA apex【英文标题】:Can't install NVIDIA apex on Windows 【发布时间】:2021-11-03 01:34:02 【问题描述】:我想在装有 Python 3.6.8 的 Windows 10 机器上安装 Nvidia Apex。我在做git clone https://github.com/NVIDIA/apex
,安装要求然后pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .
,正如他们的github页面上所说的那样。不幸的是,在其他日志中,我总是收到错误:
Cleaning up...
Removing source in C:\Users\popie\AppData\Local\Temp\pip-req-build-okoz8ok5
Removed build tracker 'C:\\Users\\popie\\AppData\\Local\\Temp\\pip-req-tracker-35lh6btm'
Command ""c:\program files\python36\python.exe" -u -c "import setuptools,tokenize;__file__='C:\\Users\\popie\\AppData\\Local\\Temp\\pip-req-build-okoz8ok5\\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 C:\Users\popie\AppData\Local\Temp\pip-record-qmhcg5oq\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\popie\AppData\Local\Temp\pip-req-build-okoz8ok5\
Exception information:
Traceback (most recent call last):
File "c:\program files\python36\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
status = self.run(options, args)
File "c:\program files\python36\lib\site-packages\pip\_internal\commands\install.py", line 366, in run
use_user_site=options.use_user_site,
File "c:\program files\python36\lib\site-packages\pip\_internal\req\__init__.py", line 49, in install_given_reqs
**kwargs
File "c:\program files\python36\lib\site-packages\pip\_internal\req\req_install.py", line 791, in install
spinner=spinner,
File "c:\program files\python36\lib\site-packages\pip\_internal\utils\misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\popie\\AppData\\Local\\Temp\\pip-req-build-okoz8ok5\\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 C:\Users\popie\AppData\Local\Temp\pip-record-qmhcg5oq\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\popie\AppData\Local\Temp\pip-req-build-okoz8ok5\
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
我已经尝试了 google 告诉我的修复方法,但没有一个有效。
【问题讨论】:
【参考方案1】:查看https://github.com/NVIDIA/apex#windows-support 中的信息。我能够使用命令“pip install -v --no-cache-dir”安装最小版本(没有 CUDA/C++ 扩展)。
【讨论】:
以上是关于无法在 Windows 上安装 NVIDIA apex的主要内容,如果未能解决你的问题,请参考以下文章
为啥 conda 无法在 Windows 上正确安装 tensorflow gpu?
NVIDIA 安装程序无法继续,此NVIDIA驱动程序与此Windows版本不兼容
如何在 Azure VM 上安装 NVIDIA 图形驱动程序