How to install dtreeviz for Decision Tree Visualization on Windows without system admin permissions

Jul 29, 2022

references:

steps:

  1. open cmd window and run the following scripts
    pip install dtreeviz             # install dtreeviz for sklearn
    pip install dtreeviz[xgboost]    # install XGBoost related dependency
    pip install dtreeviz[pyspark]    # install pyspark related dependency
    pip install dtreeviz[lightgbm]   # install LightGBM related dependency
    
  2. download the graphviz file
  3. in jupyter notebook, run the following lines
    • replace C:/Users/abc/Documents/Graphviz with the actual directory of Graphviz folder
      import os
      os.environ["PATH"] += os.pathsep + 'C:/Users/abc/Documents/Graphviz/bin;C:/Users/abc/Documents/Graphviz/bin/dot.exe;'