1、直接采用下面的代码安装此库可能会产生报错:
pip install empyrical
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
2、可以改用如下的指令安装此库:
pip install empyrical-reloaded
Installing collected packages: peewee, empyrical-reloaded
Successfully installed empyrical-reloaded-0.5.10 peewee-3.17.3
3、正常利用import导入此库:
import empyrical
此外,推荐一个利用该库进行投资绩效评估的Python教程链接:点我!