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