azureautomation / runbooks

Sample Automation runbooks
MIT License
150 stars 128 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 2 months ago

anranwuyan commented 2 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 2 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 2 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 1 month ago

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