from pyfinance.ols import PandasRollingOLS
我收到以下错误:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyfinance/utils.py", line 78, in <module>
from pandas.tseries.frequencies import FreqGroup, get_freq_code
ImportError: cannot import name 'FreqGroup' from 'pandas.tseries.frequencies' (/usr/local/lib/python3.8/site-packages/pandas/tseries/frequencies.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/pyfinance/__init__.py", line 32, in <module>
from .returns import TFrame, TSeries # noqa
File "/usr/local/lib/python3.8/site-packages/pyfinance/returns.py", line 42, in <module>
from pyfinance import ols, utils
File "/usr/local/lib/python3.8/site-packages/pyfinance/ols.py", line 15, in <module>
from pyfinance import utils
File "/usr/local/lib/python3.8/site-packages/pyfinance/utils.py", line 80, in <module>
from pandas._libs.tslibs.frequencies import FreqGroup, get_freq_code
ModuleNotFoundError: No module named 'pandas._libs.tslibs.frequencies'
我尝试卸载并重新安装熊猫版本 1.1.3、1.1.2、1.1.1,但它们都不起作用,我只是得到同样的错误,然后我尝试以以下方式构建熊猫:
!python setup.py build_ext --inplace --force
我仍然得到同样的错误