OpenBBTerminal
OpenBBTerminal copied to clipboard
[Bug] Pip install pulls in wrong version of openai
Describe the bug
Wasn't able to pip install and run openbb
.
Traceback (most recent call last):
File "/tmp/openbb/bin/openbb", line 5, in <module>
from terminal import main
File "/tmp/openbb/lib/python3.10/site-packages/terminal.py", line 8, in <module>
from openbb_terminal.terminal_helper import (
File "/tmp/openbb/lib/python3.10/site-packages/openbb_terminal/terminal_helper.py", line 22, in <module>
from openbb_terminal import thought_of_the_day as thought
File "/tmp/openbb/lib/python3.10/site-packages/openbb_terminal/thought_of_the_day.py", line 10, in <module>
from openbb_terminal.helper_funcs import request
File "/tmp/openbb/lib/python3.10/site-packages/openbb_terminal/helper_funcs.py", line 43, in <module>
from llama_index import (
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/__init__.py", line 15, in <module>
from llama_index.embeddings.langchain import LangchainEmbedding
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/embeddings/__init__.py", line 5, in <module>
from llama_index.embeddings.openai import OpenAIEmbedding
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/embeddings/openai.py", line 18, in <module>
from llama_index.llms.openai_utils import validate_openai_api_key
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/llms/__init__.py", line 2, in <module>
from llama_index.llms.azure_openai import AzureOpenAI
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/llms/azure_openai.py", line 6, in <module>
from llama_index.llms.openai import OpenAI
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/llms/openai.py", line 29, in <module>
from llama_index.llms.openai_utils import (
File "/tmp/openbb/lib/python3.10/site-packages/llama_index/llms/openai_utils.py", line 6, in <module>
from openai import ChatCompletion, Completion
ImportError: cannot import name 'ChatCompletion' from 'openai' (/tmp/openbb/lib/python3.10/site-packages/openai/__init__.py)
To Reproduce
python3.10.9 -m venv .
pip install openbb
openbb
Desktop (please complete the following information):
- OS: Fedora 38
- Python version 3.10.9
Additional context
Was able to get it working by pinning openai to 0.28.1
pip install openai==0.28.1
I'm assuming the latest open ai release broke something: https://pypi.org/project/openai/#history.