Repository: truera/trulens
Issue: AttributeError: module 'openai' has no attribute 'OpenAI'
Root cause: External Dependency Breakage

Facing this error when I'm trying to import Trulens:

Traceback (most recent call last):
  File "c:\Users\Nik\test.py", line 20, in <module>
    from trulens_eval import Tru
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\__init__.py", line 83, in <module>
    from trulens_eval.feedback import Feedback
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\__init__.py", line 21, in <module>
    from trulens_eval.feedback.feedback import Feedback
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\feedback.py", line 17, in <module>
    from trulens_eval.feedback.provider.endpoint.base import Endpoint
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\__init__.py", line 1, in <module>
    from trulens_eval.feedback.provider.base import Provider
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\base.py", line 10, in <module>
    from trulens_eval.feedback.provider.endpoint.base import Endpoint
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\endpoint\__init__.py", line 16, in <module>
    with OptionalImports(messages=REQUIREMENT_OPENAI):
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\utils\imports.py", line 350, in __exit__
    raise exc_value
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\endpoint\__init__.py", line 17, in <module>
    from trulens_eval.feedback.provider.endpoint.openai import OpenAIClient
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\utils\imports.py", line 275, in __import__
    mod = self.imp(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\endpoint\openai.py", line 54, in <module>
    class OpenAIClient(SerialModel):
  File "C:\Users\Nik\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\trulens_eval\feedback\provider\endpoint\openai.py", line 70, in OpenAIClient
    client: Union[oai.OpenAI, oai.AzureOpenAI] = pydantic.Field(exclude=True)
                  ^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'OpenAI'

version issue with trulens and openai. Uninstalling and installing worked