Cant detect the API key environmental variable

I am using visual studio code.
I typed:
{B541142C-0CF2-4890-A44B-F697B3DED73E} into the powershell prompt.

Then I ran the code using :
client = OpenAI( )

It gave
Exception has occurred: OpenAIError

The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

is there no way anymore to pass the api key in the python code?