0

我正在将 pandas 更改为 cudf 以加快聚合速度并降低处理速度。我想出了一个可以在 GPU 上使用 pandas 的库。

“CUDF 链接” https://github.com/rapidsai/cudf

当我输入以下内容以在我的项目中安装时,它给出了一个错误,我还尝试了许多版本的 numba。

conda install -c rapidsai -c nvidia -c numba -c conda-forge \
    cudf=0.13 python=3.7 cudatoolkit=10.2

追溯

Traceback (most recent call last):
  File "/home/khawar/deepface/tests/Ensemble-Face-Recognition.py", line 5, in <module>
    import cudf
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/__init__.py", line 7, in <module>
    from cudf import core, datasets
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/core/__init__.py", line 3, in <module>
    from cudf.core import buffer, column
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/core/column/__init__.py", line 1, in <module>
    from cudf.core.column.categorical import CategoricalColumn  # noqa: F401
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/core/column/categorical.py", line 11, in <module>
    import cudf._libxx as libcudfxx
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/_libxx/__init__.py", line 5, in <module>
    from . import (
  File "cudf/_libxx/aggregation.pxd", line 9, in init cudf._libxx.reduce
  File "cudf/_libxx/aggregation.pyx", line 11, in init cudf._libxx.aggregation
  File "/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/cudf/utils/cudautils.py", line 7, in <module>
    from numba import cuda, numpy_support
ImportError: cannot import name 'numpy_support' from 'numba' (/home/khawar/anaconda3/envs/deepface/lib/python3.7/site-packages/numba/__init__.py)
4

1 回答 1

0

在尝试安装 cuDF 0.13 时,conda 显然发现了与该 cuDF 0.13 不兼容的 numba 版本。

cuDF 0.13 已过时。当前稳定版本为 0.17,每晚版本为 0.18。我们将更新自述文件,因为它应该提供当前版本的安装说明。

我们建议创建一个全新的 conda 环境。请尝试以下 conda install 命令,在此处找到:

conda create -n rapids-0.17 -c rapidsai -c nvidia -c conda-forge \
    -c defaults rapids-blazing=0.17 python=3.7 cudatoolkit=10.2
于 2021-02-04T13:35:29.417 回答