googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.18k stars 713 forks source link

unable to use python cudf package #4391

Closed uroyds closed 6 months ago

uroyds commented 7 months ago

Hello, I tried to use python cudf package, but in my environment for colab, it is not installed. So tried to install cudf (ver 12, also tried ver-11 ) package of python as follow:

!pip install --extra-index-url=https://pypi.nvidia.com cudf-cu12

It went through many dependencies, and I can not solve circular dependencies of libraries, tried to install, unstall different libraries like uvicorn, kaleido, fastapi, fastapi of diffent verison as came up in log, but did not work.

For using colab, do I have set up environment and solve never ending dependencies ? or I am not allowed to use cudf ?

For me cypy works ok, but not cudf .

log after !pip install --extra-index-url=https://pypi.nvidia.com cudf-cu12 command :

Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com/ Collecting cudf-cu12 Downloading https://pypi.nvidia.com/cudf-cu12/cudf_cu12-24.2.1-cp310-cp310-manylinux_2_28_x86_64.whl (464.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 464.7/464.7 MB 3.0 MB/s eta 0:00:00 Requirement already satisfied: cachetools in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (5.3.2) Collecting cuda-python<13.0a0,>=12.0 (from cudf-cu12) Downloading cuda_python-12.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.6/23.6 MB 38.6 MB/s eta 0:00:00 Requirement already satisfied: cupy-cuda12x>=12.0.0 in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (12.2.0) Requirement already satisfied: fsspec>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (2023.6.0) Requirement already satisfied: numba>=0.57 in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (0.58.1) Collecting numpy<1.25,>=1.21 (from cudf-cu12) Downloading numpy-1.24.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 47.0 MB/s eta 0:00:00 Collecting nvtx>=0.2.1 (from cudf-cu12) Downloading nvtx-0.2.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (582 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 582.6/582.6 kB 32.4 MB/s eta 0:00:00 Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (23.2) Requirement already satisfied: pandas<1.6.0dev0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (1.5.3) Collecting protobuf<5,>=4.21 (from cudf-cu12) Downloading protobuf-4.25.3-cp37-abi3-manylinux2014_x86_64.whl (294 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.6/294.6 kB 19.9 MB/s eta 0:00:00 Collecting pynvjitlink-cu12 (from cudf-cu12) Downloading https://pypi.nvidia.com/pynvjitlink-cu12/pynvjitlink_cu12-0.1.12-cp310-cp310-manylinux_2_17_x86_64.whl (21.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.5/21.5 MB 65.4 MB/s eta 0:00:00 Collecting pyarrow<15.0.0a0,>=14.0.1 (from cudf-cu12) Downloading pyarrow-14.0.2-cp310-cp310-manylinux_2_28_x86_64.whl (38.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.0/38.0 MB 10.5 MB/s eta 0:00:00 Requirement already satisfied: rich in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (13.7.0) Collecting rmm-cu12==24.2.* (from cudf-cu12) Downloading https://pypi.nvidia.com/rmm-cu12/rmm_cu12-24.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 56.2 MB/s eta 0:00:00 Requirement already satisfied: typing_extensions>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from cudf-cu12) (4.9.0) Requirement already satisfied: fastrlock>=0.5 in /usr/local/lib/python3.10/dist-packages (from cupy-cuda12x>=12.0.0->cudf-cu12) (0.8.2) Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in /usr/local/lib/python3.10/dist-packages (from numba>=0.57->cudf-cu12) (0.41.1) Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas<1.6.0dev0,>=1.3->cudf-cu12) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<1.6.0dev0,>=1.3->cudf-cu12) (2023.4) Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich->cudf-cu12) (3.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich->cudf-cu12) (2.16.1) Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich->cudf-cu12) (0.1.2) Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas<1.6.0dev0,>=1.3->cudf-cu12) (1.16.0) Installing collected packages: nvtx, cuda-python, pynvjitlink-cu12, protobuf, numpy, pyarrow, rmm-cu12, cudf-cu12 Attempting uninstall: protobuf Found existing installation: protobuf 3.20.3 Uninstalling protobuf-3.20.3: Successfully uninstalled protobuf-3.20.3 Attempting uninstall: numpy Found existing installation: numpy 1.25.2 Uninstalling numpy-1.25.2: Successfully uninstalled numpy-1.25.2 Attempting uninstall: pyarrow Found existing installation: pyarrow 10.0.1 Uninstalling pyarrow-10.0.1: Successfully uninstalled pyarrow-10.0.1 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. lida 0.0.10 requires fastapi, which is not installed. lida 0.0.10 requires kaleido, which is not installed. lida 0.0.10 requires python-multipart, which is not installed. lida 0.0.10 requires uvicorn, which is not installed. tensorflow-metadata 1.14.0 requires protobuf<4.21,>=3.20.3, but you have protobuf 4.25.3 which is incompatible. Successfully installed cuda-python-12.3.0 cudf-cu12-24.2.1 numpy-1.24.4 nvtx-0.2.10 protobuf-4.25.3 pyarrow-14.0.2 pynvjitlink-cu12-0.1.12 rmm-cu12-24.2.0 WARNING: The following packages were previously imported in this runtime: [numpy] You must restart the runtime in order to use newly installed versions.

Thank you, Uttam Roy

uroyds commented 7 months ago

What web browser you are using chrome

mayankmalik-colab commented 7 months ago

Yes, cudf is not preinstalled because of a few reasons. However, you can still install it manually. I think you might need to restart your session as mentioned on the last line of the installation. Runtime -> Restart session