Issue
I'm importing get_embedding
from openai.embeddings_utils
.
I received a ModuleNotFound
error and, after installing
matplotlib
plotly
scipy
I got another saying that sklearn
wasn't found. I've installed that, apparently successfully:
Successfully built sklearn
Installing collected packages: sklearn
Successfully installed sklearn-0.0.post5
When I run the code though:
from openai.embeddings_utils import get_embedding
df['embedding'] = df['text'].apply(lambda x:
get_embedding(x, engine='text-embedding-ada-002'))
I still get the exception:
ModuleNotFoundError: No module named 'sklearn'
I'm very new to Python and Pip, is there some magic I need to do for this particular package?
Solution
Did you try installing the package using:
pip install scikit-learn
Answered By - gtomer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.