Download presentation
Presentation is loading. Please wait.
Published byEthelbert Whitehead Modified over 6 years ago
1
How to add the packages for printing decision trees
2
Step 1: Install seaborn If you get an error message like this “No module named 'seaborn' ”, you can use the command “conda install seaborn” to install this package. Step1. under Program->Anaconda->Anaconda Prompt, open Anaconda Prompt, type in the following command: conda install seaborn Step2. After the window outputs "Proceed ([y]/n)?", press "y" Important!: Each time after you install a package, please restart Jupyter Notebook, so that the software can pick up the new packages.
3
Step 2: Install pydotplus
If you get an error message like this “No module named 'pydot‘”, you can use the pip command to install the pydotplus package Step1: replace all the occurrences of ‘pydot’ with ‘pydotplus’ in your notebook. There are two places need to be replaced. Step2: Open Anaconda prompt, get into the location of pip.exe by typing: “cd C:\Program Files\Anaconda3\Scripts”. Step 3: type “pip install pydotplus” Note: replace the highlighted part with the actual path of Anaconda3 on your computer.
4
Step 3: Install graphviz
If you get an error message like: “GraphViz's executables not found” “'list' object has no attribute 'create_png'” “print_tree has no value” You have to install the graphviz package follow these steps. 1) Open Anaconda prompt, type “conda install graphviz” 2) Get into the location of pip.exe by typing: “cd C:\Program Files\Anaconda3\Scripts” at Anaconda prompt, type “pip install graphviz” 3) add the path of graphviz to environment variable. (See more details for this step in the following slides) Note: replace the highlighted part with the actual path of Anaconda3 on your computer.
5
3) add the path of graphviz to environment variable
The following slides demonstrate the detailed screenshots for this step. Reference: unable-to-find-graphvizs-executables-in-windows-8
6
1. Open the setting for “Environment Variable”
7
Right click “computer”, select “Properties”
8
Choose “Advanced system setting”
9
Click “Environment Variable”
10
Click “New” to add a new environment variable
11
2. Add a new Environment Variable
12
Add a New User Variable. Variable Name: Path Variable Value: C:\Program Files\Anaconda3\Library\bin\graphviz; C:\Program Files\Anaconda3\pkgs\graphviz \Library\bin\graphviz Note: This is the location of the file “gvedit.exe” when I log into the virtual lab. You may search for “gvedit.exe” to make sure this is the path of this file on your computer.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.