Since it looks like you’re using Windows, I’ll give the Windows style instructions.
There are multiple options, depending on the type of persistence you want.
Persistent on one computer
Open a File Explorer Window, and, in the left hand side, right-click “This PC” -> Properties -> Advanced System Settings -> Advanced tab -> Environment Variables
I have PYTHONPATH and MAGICK_CONFIGURE_PATH set in the user variables, and LM_LICENSE_FILE in the system variables. To add a new variable, click “New…” and enter the variable name and value. If you already have a variable, say, for PYTHONPATH, select it, click “Edit…” then add a semi-colon after the existing path(s), then the new path. Note: don’t add spaces, they can cause problems.
Once your variables are entered, click “OK”, and any new command prompts should see the new variables. (Command prompt windows already open won’t see the new variables.) You will likely need to restart your Python IDE.
Persistent only for a single Command Prompt window
At the command prompt, type:
set VARIABLE_NAME=value
Where “VARIABLE_NAME” and “value” are substituted with the correct names & values. You will need to do this once per variable. Note that again there are no spaces around the equal sign.
Setting environment variables in a script
If you don’t have permission to set the environment variables for the computer, and you don’t want to keep setting them in the command prompt, it is also possible to set them within the script. (I recommend using the other methods, though.)
See this page in the python documentation on how to set environment variables from a script: https://docs.python.org/2/library/os.html
Python IDE
I’m not sure which Python IDE you’re using, but it may have a settings panel that allows you to set some environment variables too. Check the documentation for your IDE.