Python 安装cuDF&;使用Rapids.ai版本0.11+;
我正在尝试用cuDF和cuML安装Rapids库到Colab会话, 并根据本例执行代码: 从…起 在安装过程中,我遇到了以下错误:Python 安装cuDF&;使用Rapids.ai版本0.11+;,python,conda,google-colaboratory,rapids,Python,Conda,Google Colaboratory,Rapids,我正在尝试用cuDF和cuML安装Rapids库到Colab会话, 并根据本例执行代码: 从…起 在安装过程中,我遇到了以下错误: - cudf=0.11 Current channels: - https://conda.anaconda.org/rapidsai-nightly/label/xgboost/linux-64 - https://conda.anaconda.org/rapidsai-nightly/label/xgboost/noarch - http
- cudf=0.11
Current channels:
- https://conda.anaconda.org/rapidsai-nightly/label/xgboost/linux-64
- https://conda.anaconda.org/rapidsai-nightly/label/xgboost/noarch
- https://conda.anaconda.org/rapidsai-nightly/linux-64
- https://conda.anaconda.org/rapidsai-nightly/noarch
- https://conda.anaconda.org/nvidia/linux-64
- https://conda.anaconda.org/nvidia/noarch
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/linux-64
- https://repo.anaconda.com/pkgs/pro/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
我已尝试使用单独安装cuDF和cuML
conda install -c rapidsai -c nvidia -c conda-forge \
-c defaults cudf=0.12 python=3.6 cudatoolkit=10.0
但仍然收到错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-10-a95ca25217db> in <module>()
----> 1 import cudf
2 import io, requests
3
4 # download CSV file from GitHub
5 url="https://github.com/plotly/datasets/raw/master/tips.csv"
ModuleNotFoundError: No module named 'cudf'
ModuleNotFoundError回溯(最近一次调用)
在()
---->1进口cudf
2导入io,请求
3.
4#从GitHub下载CSV文件
5 url=”https://github.com/plotly/datasets/raw/master/tips.csv"
ModuleNotFoundError:没有名为“cudf”的模块
如何解决此错误?更新(2020年12月21日):要直接在线跳转到GPU驱动的RAPIDS笔记本电脑,您可以使用(RAPIDS 0.15+)或继续使用Colabratory(仅RAPIDS 0.14)
更新(2020年2月19日):回到这个问题,Colab正在@try工作。玩得开心
如果您还有其他问题,请告诉我们。如果您需要更新个人Colab笔记本,请使用此脚本安装RAPIDS:
# Install RAPIDS
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh
import sys, os
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
exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals())
以前的答复:
我们正处于中间阶段,或者把我们的COLAB脚本转换成新的回购协议。
我们应该尽快更新我们所有的笔记本,努力帮助别人
也可以迁移。比如24小时内,如果不是今天太平洋标准时间的排爆
运行@TaureAndernV RAPIDS的代码后,建议进行以下代码更改。跑步需要15分钟
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh 0.19
import sys, os, shutil
sys.path.append('/usr/local/lib/python3.7/site-packages/')
os.environ['NUMBAPRO_NVVM'] = '/usr/local/cuda/nvvm/lib64/libnvvm.so'
os.environ['NUMBAPRO_LIBDEVICE'] = '/usr/local/cuda/nvvm/libdevice/'
os.environ['CONDA_PREFIX'] = '/usr/local'
for so in ['cudf', 'rmm', 'nccl', 'cuml', 'cugraph', 'xgboost', 'cuspatial']:
fn = 'lib'+so+'.so'
source_fn = '/usr/local/lib/'+fn
dest_fn = '/usr/lib/'+fn
if os.path.exists(source_fn):
print(f'Copying {source_fn} to {dest_fn}')
shutil.copyfile(source_fn, dest_fn)
if not os.path.exists('/usr/lib64'):
os.makedirs('/usr/lib64')
for so_file in os.listdir('/usr/local/lib'):
if 'libstdc' in so_file:
shutil.copyfile('/usr/local/lib/'+so_file, '/usr/lib64/'+so_file)
shutil.copyfile('/usr/local/lib/'+so_file, '/usr/lib/x86_64-linux-gnu/'+so_file)
您的jupyter是否使用了正确的python内核,即anaconda/miniconda内核?我使用以下代码安装Conda:
!wget-chttps://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh !chmod+x Miniconda3-4.5.4-Linux-x86_64.sh!bash./Miniconda3-4.5.4-Linux-x86_64.sh-b-f-p/usr/local
我只能成功地安装rapids/cudf 0.10版本,似乎这需要先安装pyarrow
和pynvml
,所以我先安装了!conda安装--是--前缀/usr/local pyarrow pynvml
。在脚本中包含这个可能会更好。按照说明,我安装了pyarrow
,但没有添加它-但是cudf
无法加载缺少的共享库:无法加载共享对象文件:libllvmlite.soI通过复制以某种方式修复了它!cp/usr/local/lib/python3.6/dist-packages/llvmlite/binding/libllvmlite.so.
但随后陷入了一个numba-imort错误:AttributeError:module'numba'没有属性'core'
(康达说它安装正确且是最新的)-这与py3.6相同-我也收到此错误AttributeError:模块'numba'没有属性'core'
。尝试升级numba-在numba文件夹的init.py中进行更改,但问题似乎没有解决谢谢@TaureanDyerNV-我尝试了BlazingSQL,发现它很有用,因为环境已经设置好了
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh 0.19
import sys, os, shutil
sys.path.append('/usr/local/lib/python3.7/site-packages/')
os.environ['NUMBAPRO_NVVM'] = '/usr/local/cuda/nvvm/lib64/libnvvm.so'
os.environ['NUMBAPRO_LIBDEVICE'] = '/usr/local/cuda/nvvm/libdevice/'
os.environ['CONDA_PREFIX'] = '/usr/local'
for so in ['cudf', 'rmm', 'nccl', 'cuml', 'cugraph', 'xgboost', 'cuspatial']:
fn = 'lib'+so+'.so'
source_fn = '/usr/local/lib/'+fn
dest_fn = '/usr/lib/'+fn
if os.path.exists(source_fn):
print(f'Copying {source_fn} to {dest_fn}')
shutil.copyfile(source_fn, dest_fn)
if not os.path.exists('/usr/lib64'):
os.makedirs('/usr/lib64')
for so_file in os.listdir('/usr/local/lib'):
if 'libstdc' in so_file:
shutil.copyfile('/usr/local/lib/'+so_file, '/usr/lib64/'+so_file)
shutil.copyfile('/usr/local/lib/'+so_file, '/usr/lib/x86_64-linux-gnu/'+so_file)