Import Error: No module name algodsdk.v2client

After updating my node, I tried to write a transaction using the Python script and I got this error:

$ /usr/bin/python /Users/emilynguyen98/node/
Traceback (most recent call last):
  File "/Users/emilynguyen98/node/", line 4, in <module>
    from algosdk.v2client import algod
ImportError: No module named algosdk.v2client

what causes this and how do I fix it?

Try to update the package:

python3 -m pip install py-algorand-sdk --upgrade

I tried to run the command you suggested. It upgraded successfully, but the issue is not resolved

Are you using the same python3 executable when updating the package and running your script?

python3 -m pip install py-algorand-sdk --upgrade
python3 /Users/emilynguyen98/node/