I encountred the same problem and all what I did was:
First uninstall the openai package with :
pip uninstall openai
Then I upgraded pip with :
pip install --upgrade pip
And i re-installed the openapi package with
pip install openai
And it worked.