I had a python program that ran fine about 2 months ago (February 2023). However, I reran the program today (April 2023), and now I'm running into issues. My python environment has not changed.
openai.Completion.create(
model="text-davinci-003",
prompt="Say this is a test",
max_tokens=7,
temperature=0
)
The program returns an AttributeError that states module 'openai' has no attribute 'api_type'. It appears OpenAI must have depreciated my library, and I no longer can run the code in its current form. How can I correct this error?
Under guidance of other posts, I simply updated my package using the following command:
pip install --upgrade openai
Unfortunately, the update fails and issues the following issue:
WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 'C:\\Python311\\Scripts\\normalizer.exe' -> 'C:\\Python311\\Scripts\\normalizer.exe.deleteme'
Without the update, the openai code in my program cannot properly run.