How to give python admin priviledges or call python with admin priviledges?

Hao Sun 21 Reputation points
2021-03-28T22:49:10.537+00:00

What would be the equivalent of python3.8 setup.py install but having python run with admin privileges? p.s. can I give python admin privileges without having to reinstall to a different location?

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,728 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jason Sandys 31,146 Reputation points Microsoft Employee
    2021-03-29T03:36:55.17+00:00

    Sorry, it's unclear what exactly you are asking about here. In Windows, you give users or groups (security principals) privileges and permissions (and not applications). So, what exactly are you trying to do or what exactly is not working that you would like to address?


  2. Hao Sun 21 Reputation points
    2021-03-29T03:59:50.737+00:00

    I reran using subprocess.call(['python.exe', 'setup.py', 'install']) following https://stackoverflow.com/questions/19672352/how-to-run-python-script-with-elevated-privilege-on-windows rather than python setup.py install and things worked