2
# Install RAPIDS
!git clone https://github.com/rapidsai/rapidsai-csp-utils.git
!bash rapidsai-csp-utils/colab/rapids-colab.sh stable

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)
# fix for BlazingSQL import issue
# ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/local/lib/python3.7/site-packages/../../libblazingsql-engine.so)
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)


Im successfully able to install RAPIDS using the above script but I simply cant get ride of the following error:

Exception: Version mismatch: this is the 'cffi' package version 1.14.5, located in '/usr/local/lib/python3.7/dist-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.14.3, located in '/usr/local/lib/python3.7/site-packages/_cffi_backend.cpython-37m-x86_64-linux-gnu.so'.  The two versions should be equal; check your installation.

I have tried everything from here and enter link description here, upgraded, downgraded, uninstalled, installed but nothing works. Any help would be greatly appreciated.

Asif Ahmed
  • 21
  • 1
  • Hey Asif, let me check this out. I wonder if the update_modules.py is running... – TaureanDyerNV May 21 '21 at 17:45
  • Can you try again, I cannot replicate and i cut and pasted your example. :) – TaureanDyerNV May 21 '21 at 18:19
  • 1
    @TaureanDyerNV I just encountered the same problem in colob – Shubham Jain May 22 '21 at 21:22
  • can you share your colab's GPU specs? what are you importing that throws the error? I know it's random, and i wasn't able to replicate it with the ones i tried. it's happened before. – TaureanDyerNV May 24 '21 at 00:40
  • can you add `exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals())` to the end of the code? that was going to be my initial solution before i couldn't replicate it – TaureanDyerNV May 24 '21 at 00:42
  • @TaureanDyerNV I just ran it again and now it's working without changing anything, strange. I'm importing dask_cudf and cudf. – Asif Ahmed May 25 '21 at 02:31
  • @TaureanDyerNV, also experiencing a similar issue, except it's not specific to RAPIDS. I'm using PyTorch and Numba. – Sterling Oct 22 '21 at 06:09
  • Related: https://github.com/conda-incubator/condacolab/issues/16. In this case, `!pip uninstall cffi` prior to the !pip install -q condacolab` resolved the mismatch for me. – Sterling Oct 22 '21 at 13:32

0 Answers0