azureautomation/runbooks

the python script to download python module for v 3.8 to azure automation account is not working any more and need to add below part.

Opened this issue · 3 comments

Per test in my lab, need to add below to the code so the script could still work .

  1. the runbook will fail with error
    image

solution:

add --user to the below three lines.

image

  1. once that is done, a new error will be hit as below.

image

add below to the code will fix the issue

image

Now the runbook could work.

image
image

Please update the code accordingly.

I got the same issue, but I can't follow your solution's step because It misses a screen :
image
Can you put the code please ?

I got the same issue, but I can't follow your solution's step because It misses a screen : image Can you put the code please ?

add below.

image

try:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'pip'])
except subprocess.CalledProcessError as e:
print("Error upgrading pip:", e)

I had this issue today, thank you for the above @anranwuyan, that fixed it 👍