当前位置:首页 >> 智能终端演进 >> 【torchlars】windows下载github中的torchlars包遇到的问题及解决方案,疯狂猜图品牌所有答案

【torchlars】windows下载github中的torchlars包遇到的问题及解决方案,疯狂猜图品牌所有答案

cpugpu芯片开发光刻机 智能终端演进 3
文件名:【torchlars】windows下载github中的torchlars包遇到的问题及解决方案,疯狂猜图品牌所有答案 【torchlars】windows下载github中的torchlars包遇到的问题及解决方案 环境

python3.7 windows10 cuda11.1 pytorch1.8.1 虚拟环境miniconda

目的

windows下载github中的torchlars包

遇到的问题

问题一:直接下载好文件夹输入指令:python setup.py install 出现错误:RuntimeError: Error compiling objects for extension 解决方法:应先输入python setup.py build develop

问题二:subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1. 解决方法: 修改torchlars 中的setup文件:

# cmdclass={'build_ext': BuildExtension},cmdclass={'build_ext': BuildExtension.with_options(use_ninja=False)}, 具体步骤

1、检查Microsoft Visual Studio的版本(需2017、2019),如没有Microsoft Visual Studio或者版本不对,会出现bug: fatal error C1189: #error: – unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2019 (inclusive) are supported! The nvcc flag ‘-allow-unsupported-compiler’ can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin\nvcc.exe’ failed with exit code 2

2、python setup.py build develop 3、python setup.py install

协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐
«    2025年12月    »
1234567
891011121314
15161718192021
22232425262728
293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接