How to pass an environment variable as a command line parameter in Run/Debug configuration in PyCharm?
in PyCharm Run/Debug configuration for "Script Parameters:" Enter
-u ${myVar}
Note: This will work only for existing env. variables but not for env. variables that you set up in the PyCharm Run/Debug configuration. For that to work, you will need to look into "Before Launch" configuration