在Google Colab中使用SFA时导入StochasticFrontier报错咨询
解决
cannot import name 'StochasticFrontier' from 'frontier'报错 - 你装错包了:PyPI上的
frontier包和随机前沿分析(SFA)无关,真正做SFA的是scikit-frontier(原pyfrontier)。 - 按以下步骤修正:
- 卸载错误的包:
!pip uninstall -y frontier - 安装正确的SFA包:
!pip install scikit-frontier - 用正确的导入语句:
from skfrontier import StochasticFrontier
- 卸载错误的包:
内容的提问来源于stack exchange,提问作者far
相关产品推荐
相关产品推荐

