Pycharm run python with root privileges

1) Create a new interpreter for Pycharm. Firstly create a file with the following contents. As it is seen as a comment, your user needs NOPASSWD enabed which is explained in the previous posts.

2) Open PyCharm, go to File->Settings->Project Interpreter->Add Local
pycharm1

3) Then select the file which is created in step 1, and add that interpreter to Pycharm. Now you have a python interpreter which has root privileges.

Leave a Reply

Your email address will not be published. Required fields are marked *