Web3 not being recognized in the code #118
-
Hi, I installed the latest Build Tools and successfully completed pip install web3, however I'm receiving a message saying, 'Import "web3" could not be resolved.' Also the web3 portion at the top of the code, 'from web3 import Web3', is not highlighting in green and is underlined. Has anyone else had/solved this problem? Thanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
if you run again |
Beta Was this translation helpful? Give feedback.
-
Hi, I also faced the same issue of "Import "web3" could not be resolved", when I entered 'pip install web3', I was also presented a long string of errors including "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/". I followed some instructions on forums an downloaded and installed the Visual Studio Build Tools and tried doing "pip install web3'" again, it seemed to have installed but when I key in 'from web3 import Web3' into the code, I still the got message "Import "web3" could not be resolved". |
Beta Was this translation helpful? Give feedback.
if you run again
pip install web3
what is printed? which IDE are you using? are you using a virtual environment?