安装troch.sparse报错

报的第一个错:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"·

解决办法:安装visual studio
下载插件在这里插入图片描述

下载

安装vs之后,报了第二个错

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed
 with exit status 2

解决办法:
参考
https://blog.csdn.net/kaever/article/details/106526610
在这里插入图片描述
有些差异:
在这里插入图片描述
我的windows没有10.0.18362那个文件
于是我使用10.0.19041下的文件代替,失败
我怀疑可能是vs的插件没有装够

在这里插入图片描述
无用,仍旧失败

尝试更新pip:
失败

 C:\Users\tingzi\AppData\Local\Temp\pip-install-k_6fu79e\torch-sparse_cf620bd27a0f4cf481c513fcfc0a782e\csrc\sparse.h(3): fatal error C1083: 无法打
开包括文件: “torch/library.h”: No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' fail
ed with exit status 2
      Error in atexit._run_exitfuncs:
      Traceback (most recent call last):
        File "D:\anaconda\envs\pycharmProject\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
          return stream.closed
      ValueError: underlying buffer has been detached
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> torch_sparse

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
PS D:\pycharmProject> 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值