首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Colab AttributeError中的RAPIDS :模块'cudf‘没有属性’cudf‘

Colab AttributeError中的RAPIDS :模块'cudf‘没有属性’cudf‘
EN

Stack Overflow用户
提问于 2020-06-05 08:54:30
回答 1查看 767关注 0票数 2

我已经在Colab中安装RAPIDS,没有任何问题,直到我尝试导入cuml库。我有幸运的特斯拉4作为图形处理器。

这就是我安装RAPIDS的方式

代码语言:javascript
复制
# clone RAPIDS AI rapidsai-csp-utils scripts repo
>> !git clone https://github.com/rapidsai/rapidsai-csp-utils.git    
# install RAPIDS
>> !bash rapidsai-csp-utils/colab/rapids-colab.sh
>> import sys, os
# set necessary environment variables 
>> dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')
>> sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages']+sys.path[dist_package_index:]
>> sys.path    
# update pyarrow & modules 
>> exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals())
Enjoy using RAPIDS!
RAPIDS Version to install is 0.11
Checking for GPU type:
***********************************************************************
Woo! Your instance has the right kind of GPU, a 'Tesla T4'!
***********************************************************************

************************************************
Your Google Colab instance has RAPIDS installed!
************************************************
***********************************************************************
Let us check on those pyarrow and cffi versions...
***********************************************************************
You're running pyarrow 0.15.0 and are good to go!
unloaded cffi 1.11.5
loaded cffi 1.11.5

当我尝试导入时:

代码语言:javascript
复制
>> import cuml

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-31-a450aff8eac6> in <module>()
----> 1 import cuml

5 frames
/usr/local/lib/python3.6/site-packages/cudf/core/dataframe.py in <module>()
     22 
     23 import cudf
---> 24 import cudf._lib as libcudf
     25 import cudf._libxx as libcudfxx
     26 from cudf._libxx.null_mask import MaskState, create_null_mask

AttributeError: module 'cudf' has no attribute '_lib'

我还写了这句话:

代码语言:javascript
复制
>> ! conda list | grep cudf
>> ! conda list | grep cuml
>> ! conda list | grep cugraph
>> ! conda list | grep numpy
>> ! conda list | grep pandas

cudf                      0.13.0                   py36_0    rapidsai/label/main
dask-cudf                 0.13.0                   py36_0    rapidsai/label/main
libcudf                   0.13.0               cuda10.0_0    rapidsai/label/main
cuml                      0.13.0          cuda10.0_py36_0    rapidsai/label/main
libcuml                   0.13.0               cuda10.0_0    rapidsai/label/main
libcumlprims              0.13.0               cuda10.0_0    nvidia
cugraph                   0.13.0                   py36_0    rapidsai/label/main
libcugraph                0.13.0               cuda10.0_0    rapidsai/label/main
numpy                     1.17.5           py36h95a1406_0    conda-forge
pandas                    0.25.3           py36hb3f55d8_0    conda-forge

这就是我的问题,我正试着和RAPIDS一起使用他的T-SNE,比Scipy的T-SNE更快。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-06-10 03:44:52

感谢分享这篇文章。该问题是由numba (0.48.0 -- 0.49.0)的更新造成的,该更新使其与cudf不兼容。这个PR https://github.com/rapidsai/rapidsai-csp-utils/pull/18解决了这个问题,它将numba锁定在0.13及更低版本的0.48.0。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62206438

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档