Install the Anvil Uplink library in the environment where your script runs:

pip install anvil-uplink