热线电话:13121318867

登录
2021-04-15 阅读量: 1944
python中如何安装fancyimpute库?

接下来重整思路看下如何安装pip install fancyimpute


接下来安装fancyimpute库,如果以前没有安装成功,需要先卸载干净

pip uninstall fancyimpute

然后安装



1.安装fancyimpute库之前先安装几个依赖库 cvxopt scs ecos CVXcanon fastcache cvxpy


cvxpy库本来就有 版本为 1.1.12

fastcache库本来就有 版本为 1.1.0 py38he774522_0

ecos 库本来就有 版本为2.0.7.post1 pypi_0 pypi

scs库本来就有版本为2.1.3 pypi_0 pypi

cvxopt库没有

CVXcanon库没有


我们先安装cvxopt库

启动anaconda prompt

pip install --use-feature=2020-resolver --upgrade cvxopt -i https://pypi.douban.com/simple

安装过程没有发现错误提示 Successfully installed cvxopt-1.2.6


然后安装CVXcanon库

启动anaconda prompt

pip install --use-feature=2020-resolver --upgrade cvxcanon -i https://pypi.douban.com/simple

安装过程没有发现错误提示 Successfully installed cvxcanon-0.1.2

2.安装完依赖库库之后看依赖库是否能够成功导入

导入fastcache ecos scs cvxopt CVXcanon库成功

导入cvxpy库失败 错误提示见https://www.cda.cn/discuss/post/details/6077b372443ef776b6fae52f

然后按照帖子所示方法进行处理,直到能够成功导入cvxpy库,并且没有错误提示为止。

3.然后再安装fancyimpute库

pip install --use-feature=2020-resolver --upgrade fancyimpute -i https://pypi.douban.com/simple

显示安装成功,并且没有错误提示

4.导入fancyimpute库进行使用

然后导入fancyimpute

import fancyimpute


2021-04-15 11:03:11.314505: W tensorflow/stream_executor/platform/default/dso_lo

ader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64

_110.dll not found

2021-04-15 11:03:11.322505: I tensorflow/stream_executor/cuda/cudart_stub.cc:29]

Ignore above cudart dlerror if you do not have a GPU set up on your machine.

>>>


你电脑上没有gpu的话可以忽略这条错误提示,接下来我们导入这个库试试

>>> from fancyimpute import KNN

>>> KNN(k=5,verbose=0)

KNN(fill_method='zero', k=5, max_value=None, min_value=None, normalizer=None, or

ientation='rows', print_interval=100, verbose=0)

>>>


发现已经可以用了


0.0000
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子