Skip to content

pip3 install openai does not install required dependencies #226

@crbellis

Description

@crbellis

Describe the bug

When creating a new environment and running pip3 install openai the following modules are required to run some functions within the openai.embedding_utils:

  • matplotlib
  • plotly

To Reproduce

  1. create a new python environment ex: python3 -m venv venv
  2. activate env, ex: source venv/bin/activate
  3. import the embedding_utils function get_embedding
  4. run file
  5. expected output:
    ModuleNotFoundError: No module named 'matplotlib'
    and after installing matplotlib
    ModuleNotFoundError: No module named 'plotly'

Code snippets

import openai
from openai.embeddings_utils import get_embedding
"""
will receive the ModuleNotFoundErrors mentioned above. 
Expected result would be: install the above dependencies when installing openai
"""

OS

macOS

Python version

Python v3.10.5

Library version

openai-python v0.26.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions