Skip to content

Lesson 4: ImportError: cannot import name 'getargspec' from 'inspect' #1771

Answered by cromewar
v1ka48 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @v1ka48
I've made some research this and it seems to be a problem on the working directory you are using, you said you are using python v 3.9, but the output on your vscode is for Python 3.11.
It seems you are not using the correct interpreter to run the code, please try using a python virtualenv and install web3 on it.
Remember that when you create a virtualenv you should activate it with:

source virtualenv/bin/activate

It seems that on your terminal you don't have installed web3 as its using the version 3.9 you talked about, and the vscode terminal interpreter is using 3.11 which has problems with web3 libraries. You can also try to install web3 first on the terminal (no vscode) a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by v1ka48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants