1

I am trying to install web3.py and get this error:

    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\onlyd\AppData\Local\Continuum\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\onlyd\\AppData\\Local\\Temp\\pip-install-ji347dtb\\pycryptodome\\setup.py'"'"'; __file__='"'"'C:\\Users\\onlyd\\AppData\\Local\\Temp\\pip-install-ji347dtb\\pycryptodome\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\onlyd\AppData\Local\Temp\pip-install-ji347dtb\pycryptodome\
    Complete output (20 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\onlyd\AppData\Local\Temp\pip-install-ji347dtb\pycryptodome\setup.py", line 468, in <module>
        set_compiler_options(package_root, ext_modules)
      File "C:\Users\onlyd\AppData\Local\Temp\pip-install-ji347dtb\pycryptodome\compiler_opt.py", line 341, in set_compiler_options
        clang = compiler_is_clang()
      File "C:\Users\onlyd\AppData\Local\Temp\pip-install-ji347dtb\pycryptodome\compiler_opt.py", line 251, in compiler_is_clang
        return test_compilation(source, msg="clang")
      File "C:\Users\onlyd\AppData\Local\Temp\pip-install-ji347dtb\pycryptodome\compiler_opt.py", line 82, in test_compilation
        objects = compiler.compile([fname], extra_postargs=extra_cc_options)
      File "C:\Users\onlyd\AppData\Local\Continuum\anaconda3\lib\distutils\_msvccompiler.py", line 346, in compile
        self.initialize()
      File "C:\Users\onlyd\AppData\Local\Continuum\anaconda3\lib\distutils\_msvccompiler.py", line 239, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "C:\Users\onlyd\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\msvc.py", line 316, in msvc14_get_vc_env
        return _msvc14_get_vc_env(plat_spec)
      File "C:\Users\onlyd\AppData\Local\Continuum\anaconda3\lib\site-packages\setuptools\msvc.py", line 271, in _msvc14_get_vc_env
        "Unable to find vcvarsall.bat"
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    Testing support for clang
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2 Answers 2

0

See this: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

You need a C compiler to install dependencies web3.py is using.

2
  • 1
    Thank you! It literally told me what to do.
    – ghostabx
    Sep 7, 2021 at 11:35
  • Sometimes, but only rarely, error messages are helpful :) Sep 7, 2021 at 18:23
0

If you do not want to install "Microsoft C++ Build Tools", You can download prebuilt bitarray here:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#bitarray

Then execute pip3 install bitarray‑2.3.4‑cp310‑cp310‑win_amd64.whl, dependends on the python version you used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.