4

在 vscode 终端上通过“pip install eth-brownie”安装 eth-brownie 时,出现以下错误:

  • 我已经选择了默认终端 CMD
  • 我已经尝试安装所需的 VS CODE 构建工具

请帮忙,谢谢!

错误:

Running setup.py install for cytoolz ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\simpl\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\simpl\\AppData\\Local\\Temp\\pip-install-rncdvkky\\cytoolz_dc3d86c874b8423fa2581a6b8be8ab33\\setup.py'"'"'; __file__='"'"'C:\\Users\\simpl\\AppData\\Local\\Temp\\pip-install-rncdvkky\\cytoolz_dc3d86c874b8423fa2581a6b8be8ab33\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\simpl\AppData\Local\Temp\pip-record-q40t7042\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\simpl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\cytoolz'
         cwd: C:\Users\simpl\AppData\Local\Temp\pip-install-rncdvkky\cytoolz_dc3d86c874b8423fa2581a6b8be8ab33\
    Complete output (50 lines):
    ALERT: Cython not installed.  Building without Cython.
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\compatibility.py -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\utils_test.py -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\_signatures.py -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\_version.py -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\__init__.py -> build\lib.win-amd64-3.9\cytoolz
    creating build\lib.win-amd64-3.9\cytoolz\curried
    copying cytoolz\curried\exceptions.py -> build\lib.win-amd64-3.9\cytoolz\curried
    copying cytoolz\curried\operator.py -> build\lib.win-amd64-3.9\cytoolz\curried
    copying cytoolz\curried\__init__.py -> build\lib.win-amd64-3.9\cytoolz\curried
    copying cytoolz\dicttoolz.pyx -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\functoolz.pyx -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\itertoolz.pyx -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\recipes.pyx -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\utils.pyx -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\cpython.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\dicttoolz.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\functoolz.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\itertoolz.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\recipes.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\utils.pxd -> build\lib.win-amd64-3.9\cytoolz
    copying cytoolz\__init__.pxd -> build\lib.win-amd64-3.9\cytoolz
    creating build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\dev_skip_test.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_compatibility.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_curried.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_curried_toolzlike.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_dev_skip_test.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_dicttoolz.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_docstrings.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_doctests.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_embedded_sigs.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_functoolz.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_inspect_args.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_itertoolz.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_none_safe.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_recipes.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_serialization.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_signatures.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_tlz.py -> build\lib.win-amd64-3.9\cytoolz\tests
    copying cytoolz\tests\test_utils.py -> build\lib.win-amd64-3.9\cytoolz\tests
    running build_ext
    building 'cytoolz.dicttoolz' 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/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\simpl\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\simpl\\AppData\\Local\\Temp\\pip-install-rncdvkky\\cytoolz_dc3d86c874b8423fa2581a6b8be8ab33\\setup.py'"'"'; __file__='"'"'C:\\Users\\simpl\\AppData\\Local\\Temp\\pip-install-rncdvkky\\cytoolz_dc3d86c874b8423fa2581a6b8be8ab33\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\simpl\AppData\Local\Temp\pip-record-q40t7042\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\simpl\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\cytoolz' Check the logs for full command output.
4

2 回答 2

0

即使安装了 vs 工具(https://visualstudio.microsoft.com/visual-cpp-build-tools/),我也遇到了同样的错误。因此,我找到了 conda 安装。 https://anaconda.org/anaconda/cytoolz

于 2022-02-08T03:25:55.117 回答
0

您需要安装 Microsoft Visual C++ 14.0 或更高版本 然后继续它才能工作

于 2021-10-29T10:01:45.593 回答