slither-analyzer安装报错并解决error: Microsoft Visual C++ 14.0 or greater is required.

python环境3.8,执行

pip3 install slither-analyzer

后出现异常

Building wheels for collected packages: pysha3
  Building wheel for pysha3 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      copying sha3.py -> build\lib.win-amd64-cpython-38
      running build_ext
      building '_pysha3' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pysha3
  Running setup.py clean for pysha3
Failed to build pysha3
Installing collected packages: pysha3, prettytable, crytic-compile, slither-analyzer
  Running setup.py install for pysha3 ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pysha3 did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running install
      E:\anaconda\save\envs\slither\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      copying sha3.py -> build\lib.win-amd64-cpython-38
      running build_ext
      building '_pysha3' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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.
╰─> pysha3

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

在这里插入图片描述
网上有很多解决方法,看评论感觉可能有用的是这个,但是太麻烦了没有用

Microsoft Visual C++ 14.0 is required解决方法
https://zhuanlan.zhihu.com/p/126669852

我用的是另一个方法
pip install weditor 安装报错 error: subprocess-exited-with-error
https://ask.csdn.net/questions/7642639

这个subprocess-exited-with-error才是我第一个报错的地方,c++那个出现在更后面
这里说问题出在这个setup包版本太低

执行指令

pip install --upgrade pip setuptools==45.2.0

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值