Riskfolio and Openbb SDK compatibility problem #5297
Unanswered
gabrielkaiser25
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
Out of the blue I started getting the following error when trying to load openbb from openbb_terminal.sdk
`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 2
1 import numpy as np
----> 2 from openbb_terminal.sdk import openbb
3 from arch import arch_model
File ~/anaconda3/envs/quant_env/lib/python3.9/site-packages/openbb_terminal/sdk.py:43
37 from openbb_terminal.reports import widget_helpers as widgets # noqa: F401
40 from openbb_terminal.reports.reports_controller import ReportController
---> 43 import openbb_terminal.core.sdk.sdk_init as lib
46 from openbb_terminal.core.sdk import (
47 controllers as ctrl,
48 models as model,
49 )
52 from openbb_terminal.core.session.current_system import get_current_system
File ~/anaconda3/envs/quant_env/lib/python3.9/site-packages/openbb_terminal/core/sdk/sdk_init.py:643
637 from openbb_terminal.portfolio import portfolio_model, portfolio_view
640 try:
641 # pylint: disable=W0611 # noqa: F401 # pyright: reportMissingImports=false
--> 643 from openbb_terminal.portfolio.portfolio_optimization import (
644 excel_model as portfolio_optimization_excel_model,
645 optimizer_model as portfolio_optimization_optimizer_model,
646 optimizer_view as portfolio_optimization_optimizer_view,
647 po_model as portfolio_optimization_po_model,
648 po_view as portfolio_optimization_po_view,
649 )
651 OPTIMIZATION_TOOLKIT_ENABLED = True
654 except ModuleNotFoundError:
File ~/anaconda3/envs/quant_env/lib/python3.9/site-packages/openbb_terminal/portfolio/portfolio_optimization/po_model.py:14
12 from numpy import floating
13 from numpy.typing import NDArray
---> 14 from riskfolio import rp
16 from openbb_terminal.decorators import log_start_end
17 from openbb_terminal.portfolio.portfolio_optimization import (
18 optimizer_helper,
19 optimizer_model,
20 )
ImportError: cannot import name 'rp' from 'riskfolio'`
If I have riskfolio installed in my env, openbb fails to load. If I uninstall it, everything works fine. It's the same env that I was working with last week, with no update installed. I'm on a M2 Max Macbook, using vscode. Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions