import os os.environ["OPENAI_API_KEY"] = "your-api-key-here"
this works for me other ways just throwing teh same error over and over