python2.7 安装 lifelines 时 bottleneck 安装错误解决

lifelines github地址:https://github.com/CamDavidsonPilon/lifelines

lifelines Python Software Foundation: https://pypi.org/project/lifelines/

lifelines安装命令:

pip install lifelines
#下载指定版本的lifelines
pip install lifelines == 版本号

lifelines 所需要的其他包(下载lifelines时会自动下载):

scipy>=1.0

pandas>=0.18

autograd>=1.2

numpy>=1.6.0

bottleneck>=1.0

错误情形:

python2.7 安装 lifelines 时 bottleneck 安装错误解决_第1张图片

python2.7 安装 lifelines 时 bottleneck 安装错误解决_第2张图片

错误原因:安装 lifelines 的依赖包 bottleneck 时,由于缺少 vcpython27 导致安装错误

解决方法:

按照此提示 error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 下载 vcpython27

vcpython27 下载地址:https://www.microsoft.com/en-us/download/details.aspx?id=44266

python2.7 安装 lifelines 时 bottleneck 安装错误解决_第3张图片

点此下载,安装过程一路next即可,win10实测不需要配置环境变量。

然后重新下载 lifelines ,显示安装成功:

python2.7 安装 lifelines 时 bottleneck 安装错误解决_第4张图片

 导入成功:

其他可供参考的:

python 第三方下载库(Unofficial Windows Binaries for Python Extension Packages):https://www.lfd.uci.edu/~gohlke/pythonlibs/

python 如何下载第三方库(例如github上开源的第三方库):https://www.cnblogs.com/XJT2018/p/10086993.html

 

你可能感兴趣的:(python2.7 安装 lifelines 时 bottleneck 安装错误解决)