模块 'linearmodels' 的 ModuleNotFoundError
ModuleNotFoundError for module 'linearmodels'
我想执行 OLS 面板回归
import pandas as pd
import numpy as np
import statsmodels.api as sm
from linearmodels.datasets import wage_panel
from linearmodels.panel import PanelOLS
data = wage_panel.load()
但是我得到这个错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-fe79e40655e1> in <module>
3 import statsmodels.api as sm
4
----> 5 from linearmodels.datasets import wage_panel
6 from linearmodels.panel import PanelOLS
7
ModuleNotFoundError: No module named 'linearmodels'
我不知道为什么会这样。有什么想法吗?
“linearmodels”是一个单独的包,请参阅 https://github.com/bashtage/linearmodels。所以必须单独安装:
pip install linearmodels
适合我。
我想执行 OLS 面板回归
import pandas as pd
import numpy as np
import statsmodels.api as sm
from linearmodels.datasets import wage_panel
from linearmodels.panel import PanelOLS
data = wage_panel.load()
但是我得到这个错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-fe79e40655e1> in <module>
3 import statsmodels.api as sm
4
----> 5 from linearmodels.datasets import wage_panel
6 from linearmodels.panel import PanelOLS
7
ModuleNotFoundError: No module named 'linearmodels'
我不知道为什么会这样。有什么想法吗?
“linearmodels”是一个单独的包,请参阅 https://github.com/bashtage/linearmodels。所以必须单独安装:
pip install linearmodels
适合我。