Import Error: No module name algodsdk.v2client - General - Algorand

Import Error: No module name algodsdk.v2client

post by thinguyen on Jul 15, 2021

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/writeTransaction.py
Traceback (most recent call last):
  File "/Users/emilynguyen98/node/writeTransaction.py", line 4, in <module>
    from algosdk.v2client import algod
ImportError: No module named algosdk.v2client

what causes this and how do I fix it?

post by fabrice on Jul 15, 2021

Try to update the package:

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

post by thinguyen on Jul 18, 2021

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

post by fabrice on Jul 18, 2021

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

Concretely:

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