azureautomation / runbooks

Sample Automation runbooks
MIT License
156 stars 129 forks source link

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. #110

Open anranwuyan opened 6 months ago

anranwuyan commented 6 months ago

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.

Ledge2494 commented 6 months ago

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 ?

anranwuyan commented 6 months ago

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)

ChrisTav424 commented 6 months ago

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