This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

as the error message says, you need pdflatex --shell-escape yourfile.tex not pdflatex yourfile.tex
– David CarlisleSep 3 '18 at 10:23

@DavidCarlisle How to do that on Windows?
– vasili111Sep 3 '18 at 10:24

2

well I tend to use the commandline so I would just type what I wrote. If you ask how to configure texstudio I do not know I don't have that editor, but it may have an option already
– David CarlisleSep 3 '18 at 10:25