-3

I am trying to install web3 using pip, but it keeps running into an error.

I have seen suggestions telling me to install older versions of web3. I have already done that. After running the install command, it installs most of the components but seems to run into an error installing cytoolz while running setup.py. (as you can see in the first line of the error message).

I am using python version 3.10.1

pip install web3

The error:

Running setup.py install for cytoolz ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-hvw_02uz\\cytoolz_5bf05182706b4ad08510aa829a45e3d5\\setup.py'"'"'; __file__='"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-hvw_02uz\\cytoolz_5bf05182706b4ad08510aa829a45e3d5\\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\AppData\Local\Temp\pip-record-z70jeg29\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Include\cytoolz'
         cwd: C:\Users\AppData\Local\Temp\pip-install-hvw_02uz\cytoolz_5bf05182706b4ad08510aa829a45e3d5\
    Complete output (49 lines):
    ALERT: Cython not installed.  Building without Cython.
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.10
    creating build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\compatibility.py -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\_signatures.py -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\_version.py -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\__init__.py -> build\lib.win-amd64-3.10\cytoolz
    creating build\lib.win-amd64-3.10\cytoolz\curried
    copying cytoolz\curried\exceptions.py -> build\lib.win-amd64-3.10\cytoolz\curried
    copying cytoolz\curried\operator.py -> build\lib.win-amd64-3.10\cytoolz\curried
    copying cytoolz\curried\__init__.py -> build\lib.win-amd64-3.10\cytoolz\curried
    copying cytoolz\dicttoolz.pyx -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\functoolz.pyx -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\itertoolz.pyx -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\recipes.pyx -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\utils.pyx -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\cpython.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\dicttoolz.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\functoolz.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\itertoolz.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\recipes.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\utils.pxd -> build\lib.win-amd64-3.10\cytoolz
    copying cytoolz\__init__.pxd -> build\lib.win-amd64-3.10\cytoolz
    creating build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\dev_skip_test.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_compatibility.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_curried.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_curried_toolzlike.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_dev_skip_test.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_dicttoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_docstrings.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_doctests.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_embedded_sigs.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_functoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_inspect_args.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_itertoolz.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_none_safe.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_recipes.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_serialization.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_signatures.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_tlz.py -> build\lib.win-amd64-3.10\cytoolz\tests
    copying cytoolz\tests\test_utils.py -> build\lib.win-amd64-3.10\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\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-hvw_02uz\\cytoolz_5bf05182706b4ad08510aa829a45e3d5\\setup.py'"'"'; __file__='"'"'C:\\Users\\AppData\\Local\\Temp\\pip-install-hvw_02uz\\cytoolz_5bf05182706b4ad08510aa829a45e3d5\\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\AppData\Local\Temp\pip-record-z70jeg29\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Include\cytoolz' Check the logs for full command output.

I would really appreciate some suggestions.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Victor
  • 7
  • 4
  • https://stackoverflow.com/search?q=%5Bpip%5D+error%3A+Microsoft+Visual+C%2B%2B+14.0+or+greater+is+required – phd Dec 20 '21 at 18:14

1 Answers1

1

As the error says, you need to download Microsoft Visual C++, which you can do here: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Mango
  • 34
  • 1