How solve problem with installing web3 for python in windows?

1k views Asked by At

I'm trying install web3 for python3.7.5 on windows 10. But I get this error every time . I don't know what should I do, because I have already installed "Microsoft Visual C++ 14.0" and Build Tools. I tried also installing in vitrual enviroment, but it ended with same error. Thanks for your advice.

  Building wheel for lru-dict (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Žaneta\\AppData\\Local\\Temp\\pip-install-p2lk_xob\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\Žaneta\\AppData\\Local\\Temp\\pip-install-p2lk_xob\\lru-dict\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Žaneta\AppData\Local\Temp\pip-wheel-89ed3hox'
       cwd: C:\Users\Žaneta\AppData\Local\Temp\pip-install-p2lk_xob\lru-dict\
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'lru' 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/
  ----------------------------------------
3

There are 3 answers

0
Žanet On BEST ANSWER

Problem is solved. Cytoolz supports Python 2.7+ and Python 3.4+. I had Python 3.8.5, so now I'm running on Python 3.2 and Web3 is installed

1
disqid On

Given the error message:

error: Microsoft Visual C++ 14.0 or greater is required. 

You may just need Microsoft Visual C++ 14.0 or greater.

0
David Randoll On

I know this is old but for anyone who runs into this issue, I got it solved by following a solution posted on github

This is the solution:

  1. Install Visual Studio Build Tools here
  2. Select the "Desktop development with C++" Workload for installation (it is about 6GB)
  3. Finish installation and reboot PC
  4. Open the terminal and retry pip install web3

Screenshot of the workload needed