pythonpython-3.xpipopenai-apiazure-openai

OpenAI API error: "No module named 'openai.embeddings_utils'; 'openai' is not a package"


I want to use openai.embeddings_utils import get_embeddings So already install openai

Name: openai
Version: 0.26.5
Summary: Python client library for the OpenAI API
Home-page: https://github.com/openai/openai-python
Author: OpenAI
Author-email: support@openai.com
License: 
Location: /Users/lima/Desktop/Paprika/Openai/.venv/lib/python3.9/site-packages
Requires: aiohttp, requests, tqdm
Required-by: 

This is my openai But why not use openai.embeddings_utils??


Solution

  • For my case, check the version of openai. openai.embeddings_utils does not exist in latest openai 1.2.0, but exists in 0.27.7