rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.16k stars 525 forks source link

[BUG] cuML installation #5483

Closed itz-sayak closed 1 year ago

itz-sayak commented 1 year ago

Describe the bug I created a virtual environment as follows and then the command it build the following error:------->

(auto) D:\AUTO ML\auto>pip install cuml
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com, https://pypi.org/simple
Collecting cuml
  Using cached cuml-0.6.1.post1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: cuml
  Building wheel for cuml (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running bdist_wheel
      running build
      installing to build\bdist.win-amd64\wheel
      running install
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-jv52s710\cuml_0cd08ad49cc4448c892d6fd90bd47544\setup.py", line 18, in <module>
          setup(name=pkg,
        File "D:\AUTO ML\auto\lib\site-packages\setuptools\__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
          dist.run_commands()
        File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
          cmd_obj.run()
        File "D:\AUTO ML\auto\lib\site-packages\wheel\bdist_wheel.py", line 378, in run
          self.run_command("install")
        File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
          cmd_obj.run()
        File "C:\Users\user\AppData\Local\Temp\pip-install-jv52s710\cuml_0cd08ad49cc4448c892d6fd90bd47544\setup.py", line 15, in run
          raise Exception(long_description)
      Exception: Please install cuml via the rapidsai conda channel. See https://rapids.ai/start.html for instructions.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cuml
  Running setup.py clean for cuml
Failed to build cuml
ERROR: Could not build wheels for cuml, which is required to install pyproject.toml-based projects

Again I installed it via rapid.ai docs from the site https://docs.rapids.ai/install using====> pip install cuml-cu11 --extra-index-url=https://pypi.nvidia.com

it throwed the error as:-

(auto) D:\AUTO ML\auto>pip install cuml-cu11 --extra-index-url=https://pypi.nvidia.com
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Collecting cuml-cu11
  Using cached cuml-cu11-23.6.0.tar.gz (6.8 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-_ybl7bdb\cuml-cu11_6bbd78624cf9448a979aecb4b66dfcb1\setup.py", line 137, in <module>
          raise RuntimeError(open("ERROR.txt", "r").read())
      RuntimeError:
      ###########################################################################################
      The package you are trying to install is only a placeholder project on PyPI.org repository.
      This package is hosted on NVIDIA Python Package Index.

      This package can be installed as:
  $ pip install --extra-index-url https://pypi.nvidia.com cuml-cu11
  ```
  ###########################################################################################

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

***************************************************************************************************************************************
also I tried using the command======>  pip install --extra-index-url https://pypi.nvidia.com cuml-cu11

(auto) D:\AUTO ML\auto>pip install --extra-index-url https://pypi.nvidia.com cuml-cu11 Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com Collecting cuml-cu11 Using cached cuml-cu11-23.6.0.tar.gz (6.8 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\user\AppData\Local\Temp\pip-install-73vfk5jx\cuml-cu11_3ebc943093ba4539a1fca04b549bd424\setup.py", line 137, in raise RuntimeError(open("ERROR.txt", "r").read()) RuntimeError: ########################################################################################### The package you are trying to install is only a placeholder project on PyPI.org repository. This package is hosted on NVIDIA Python Package Index.

  This package can be installed as:
  ```
  $ pip install --extra-index-url https://pypi.nvidia.com cuml-cu11
  ```
  ###########################################################################################

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.


**Steps/Code to reproduce bug**
**STEP 1:** 
D:\AUTO ML>python -m venv tfod

python -m venv auto

**STEP 2:**
D:\AUTO ML>.\tfod\Scripts\activate

.\auto\Scripts\activate

**STEP 3:**

python -m pip install --upgrade pip

**STEP 4:**
Paste this into a requirements.txt

adagio==0.2.4 aiofiles==23.1.0 aiohttp==3.8.4 aiosignal==1.3.1 alembic==1.11.1 altair==5.0.1 ansi2html==1.8.0 antlr4-python3-runtime==4.11.1 anyio==3.7.0 appdirs==1.4.4 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==23.1.0 autoviz==0.1.720 backcall==0.2.0 beautifulsoup4==4.12.2 bleach==6.0.0 blinker==1.6.2 bokeh==2.4.3 Boruta==0.3 boto3==1.26.163 botocore==1.29.163 cachetools==5.3.1 catboost==1.2 category-encoders==2.6.1 certifi==2023.5.7 cffi==1.15.1 charset-normalizer==3.1.0 click==8.1.3 cloudpickle==2.2.1 cmaes==0.9.1 colorama==0.4.6 colorcet==3.0.1 colorlog==6.7.0 colour==0.1.5 comm==0.1.3 contourpy==1.1.0 cryptography==41.0.1 cycler==0.11.0 Cython==0.29.35 daal==2023.1.1 daal4py==2023.1.1 dacite==1.8.1 dash==2.11.0 dash-auth==2.0.0 dash-bootstrap-components==1.4.1 dash-core-components==2.0.0 dash-cytoscape==0.3.0 dash-html-components==2.0.0 dash-table==5.0.0 dash-testing-stub==0.0.2 dask==2023.6.1 databricks-cli==0.17.7 debugpy==1.6.7 decorator==5.1.1 deepchecks==0.17.3 defusedxml==0.7.1 Deprecated==1.2.14 deprecation==2.1.0 dill==0.3.6 distributed==2023.6.1 docker==6.1.3 dtreeviz==2.2.1 emoji==2.6.0 entrypoints==0.4 evidently==0.2.8 exceptiongroup==1.1.1 executing==1.2.0 explainerdashboard==0.4.2.2 fairlearn==0.7.0 fastapi==0.98.0 fastjsonschema==2.17.1 ffmpy==0.3.0 filelock==3.12.2 Flask==2.2.3 flask-simplelogin==0.1.2 Flask-WTF==1.1.1 fonttools==4.40.0 frozenlist==1.3.3 fs==2.4.16 fsspec==2023.6.0 fugue==0.8.5 fugue-sql-antlr==0.1.6 future==0.18.3 gensim==4.3.1 gevent==22.10.2 gitdb==4.0.10 GitPython==3.1.31 gradio==3.35.2 gradio_client==0.2.7 graphviz==0.20.1 greenlet==2.0.2 grpcio==1.51.3 h11==0.14.0 holoviews==1.14.9 htmlmin==0.1.12 httpcore==0.17.2 httpx==0.24.1 huggingface-hub==0.15.1 hvplot==0.7.3 hyperopt==0.2.7 idna==3.4 ImageHash==4.3.1 imageio==2.31.1 imbalanced-learn==0.10.1 importlib-metadata==5.2.0 importlib-resources==5.12.0 iniconfig==2.0.0 interpret==0.4.2 interpret-core==0.4.2 ipykernel==6.23.3 ipython==7.34.0 ipython-genutils==0.2.0 ipywidgets==7.7.5 itsdangerous==2.1.2 jedi==0.18.2 Jinja2==3.1.2 jmespath==1.0.1 joblib==1.3.1 jsonpickle==3.0.1 jsonschema==4.17.3 jupyter==1.0.0 jupyter_client==8.3.0 jupyter-console==6.6.3 jupyter_core==5.3.1 jupyter-dash==0.4.2 jupyter-server==1.24.0 jupyterlab-pygments==0.2.2 jupyterlab-widgets==1.1.4 kaleido==0.2.1 kiwisolver==1.4.4 kmodes==0.12.2 lazy_loader==0.2 lightgbm==3.3.5 lime==0.2.0.1 linkify-it-py==2.0.2 llvmlite==0.40.1 locket==1.0.0 lxml==4.9.2 m2cgen==0.10.0 Mako==1.2.4 Markdown==3.4.3 markdown-it-py==2.2.0 MarkupSafe==2.1.3 matplotlib==3.7.1 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.3 mdurl==0.1.2 mistune==3.0.1 mlflow==1.30.1 mlxtend==0.22.0 moto==4.1.12 msgpack==1.0.5 multidict==6.0.4 multimethod==1.9.1 multiprocess==0.70.14 nbclassic==1.0.0 nbclient==0.8.0 nbconvert==7.6.0 nbformat==5.9.0 nest-asyncio==1.5.6 networkx==3.1 nltk==3.8.1 notebook==6.5.4 notebook_shim==0.2.3 numba==0.57.1 numpy==1.23.0 oauthlib==3.2.2 optuna==3.2.0 orjson==3.9.1 outcome==1.2.0 oyaml==1.0 packaging==21.3 pandas==1.5.3 pandas-dq==1.28 pandas-profiling==3.6.6 pandocfilters==1.5.0 panel==0.14.4 param==1.13.0 parso==0.8.3 partd==1.4.0 patsy==0.5.3 percy==2.0.2 phik==0.12.3 pickleshare==0.7.5 Pillow==9.5.0 pip==23.1.2 platformdirs==3.8.0 plotly==5.15.0 plotly-resampler==0.8.3.2 pluggy==1.2.0 pmdarima==2.0.3 prometheus-client==0.17.0 prometheus-flask-exporter==0.22.4 prompt-toolkit==3.0.38 protobuf==4.23.3 psutil==5.9.5 pure-eval==0.2.2 py4j==0.10.9.7 pyamg==5.0.0 pyaml==23.5.9 pyarrow==6.0.1 pycaret==3.0.3 pycparser==2.21 pyct==0.5.0 pydantic==1.10.9 pydeck==0.8.1b0 pydub==0.25.1 Pygments==2.15.1 PyJWT==2.7.0 Pympler==1.0.1 pynndescent==0.5.10 PyNomaly==0.3.3 pyod==1.1.0 pyOpenSSL==23.2.0 pyparsing==3.1.0 pyrsistent==0.19.3 PySocks==1.7.1 pytest==7.4.0 python-dateutil==2.8.2 python-multipart==0.0.6 python-utils==3.7.0 pytz==2022.7.1 pytz-deprecation-shim==0.1.0.post0 pyviz-comms==2.3.2 PyWavelets==1.4.1 pywin32==306 pywinpty==2.0.10 PyYAML==6.0 pyzmq==23.2.1 qpd==0.4.3 qtconsole==5.4.3 QtPy==2.3.1 querystring-parser==1.2.4 ray==2.5.1 regex==2023.6.3 requests==2.31.0 responses==0.23.1 retrying==1.3.4 rich==13.4.2 s3transfer==0.6.1 SALib==1.4.7 schemdraw==0.15 scikit-base==0.5.0 scikit-image==0.21.0 scikit-learn==1.2.2 scikit-learn-intelex==2023.1.1 scikit-optimize==0.9.0 scikit-plot==0.3.7 scipy==1.10.1 seaborn==0.12.2 selenium==4.2.0 semantic-version==2.10.0 Send2Trash==1.8.2 setuptools==58.1.0 shap==0.41.0 six==1.16.0 skope-rules==1.0.1 sktime==0.20.0 slicer==0.0.7 smart-open==6.3.0 smmap==5.0.0 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4.1 SQLAlchemy==1.4.48 sqlglot==16.7.4 sqlparse==0.4.4 stack-data==0.6.2 starlette==0.27.0 statsforecast==1.5.0 statsmodels==0.14.0 streamlit==1.24.0 streamlit-pandas-profiling==0.1.3 tabulate==0.9.0 tangled-up-in-unicode==0.2.0 tbats==1.1.3 tbb==2021.9.0 tblib==2.0.0 tenacity==8.2.2 tensorboardX==2.6.1 terminado==0.17.1 textblob==0.17.1 threadpoolctl==3.1.0 tifffile==2023.4.12 tinycss2==1.2.1 toml==0.10.2 tomli==2.0.1 toolz==0.12.0 tornado==6.3.2 tqdm==4.65.0 trace-updater==0.0.9.1 traitlets==5.9.0 treeinterpreter==0.2.3 triad==0.9.0 trio==0.22.0 trio-websocket==0.10.3 tune-sklearn==0.4.5 typeguard==2.13.3 types-PyYAML==6.0.12.10 typing_extensions==4.7.0 tzdata==2023.3 tzlocal==4.3.1 uc-micro-py==1.0.2 umap-learn==0.5.3 urllib3==1.26.16 urllib3-secure-extra==0.1.0 uvicorn==0.22.0 validators==0.20.0 visions==0.7.5 waitress==2.1.2 watchdog==3.0.0 wcwidth==0.2.6 webencodings==0.5.1 websocket-client==1.6.1 websockets==11.0.3 Werkzeug==2.2.3 wheel==0.40.0 widgetsnbextension==3.6.4 wordcloud==1.9.2 wrapt==1.15.0 wsproto==1.2.0 WTForms==3.0.1 xgboost==1.7.6 xlrd==2.0.1 xmltodict==0.13.0 xxhash==3.2.0 yarl==1.9.2 ydata-profiling==4.3.1 yellowbrick==1.5 zict==3.0.0 zipp==3.15.0 zope.event==5.0 zope.interface==6.0

STEP 5:

pip install -r requirements.txt



**Expected behavior**
Expected for the cuml to be installed for GPU acceleration.
I have have my CUDA and Cudnn correctly installed 

**Environment details (please complete the following information):**
 - Environment location: [local  PC]
 - Linux Distro/Architecture: [Windows 11 and x86-46]
 - GPU Model/Driver: [GeForce GTX 1050Ti and driver 460.89]
 - CUDA: [11.2]
 - Method of cuDF & cuML install: [conda, Docker, or from source]
   - pip install from source ------> pip install cuml-cu11 cudf-cu11 --extra-index-url=https://pypi.nvidia.com

**Additional context**
Add any other context about the problem here.
 I have my pip install pycaret[full] version
csadorf commented 1 year ago

Hi @itz-sayak ! Thank you very much for the very detailed error report. One thing I stumble upon is the first command your are executing: pip install cuml. That is missing the correct index, and while the correct index seems to be configured elsewhere, pip nonetheless tries to install cuml-0.6.1.post1.tar.gz which is the wrong package and expectedly fails.

In subsequent attempts you are using the correct installation command, but pip says it is using a cached package and then reports the error from the placeholder.

I was not able to reproduce the issue on my end. My suspicion is that you used the wrong command initially which somehow contaminated your environment, which then makes it impossible to install the correct version in later attempts.

Would you mind trying the installation one more time in a fresh environment, maybe in combination with --no-cache-dir?

pip install cuml-cu11 --extra-index-url=https://pypi.nvidia.com --no-cache-dir
jarmak-nv commented 1 year ago

Hey @itz-sayak I appreciate the thorough bug report! It looks like you're trying to install this on a Windows 11 machine - unfortunately RAPIDS is not supported on Windows natively.

To use RAPIDS on a Windows machine you'll need to use WSL2. Our install page has helpful instructions on how to use WSL2, please do note that each installation method (pip vs conda vs Docker) has it's own steps you'll need to follow for successful installation.

If I'm incorrect and you're using WSL2 already, please let me know so we can dig in more!

csadorf commented 1 year ago

@jarmak-nv Thank you for the insight. @itz-sayak I am going to close the issue, but please let us know if it turns out that the problem persist or you were already using WSL2. Thanks again!

eromoe commented 1 year ago

@jarmak-nv Is there any plan to support windows in futures?

jarmak-nv commented 1 year ago

@eromoe Our current Windows support plan is only through WSL2; should that change we will be sure to announce it loud and wide.