Skip to content

Commit 59ca27c

Browse files
committed
some more setup instructions
1 parent f2e9445 commit 59ca27c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

+28
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,38 @@ scikit-learn, though you need to adjust the import for everything from the
1010
``model_selection`` module, mostly ``cross_val_score``, ``train_test_split``
1111
and ``GridSearchCV``.
1212

13+
1314
This repository provides the notebooks from which the book is created, together
1415
with the ``mglearn`` library of helper functions to create figures and
1516
datasets.
1617

1718
For the curious ones, the cover depicts a [hellbender](https://en.wikipedia.org/wiki/Hellbender)
1819

20+
## Setup
21+
22+
To run the code, you need the packages ``numpy``, ``scipy``, ``scikit-learn``, ``matplotlib``, ``pandas`` and ``pillow``.
23+
Some of the visualizations of decision trees and neural networks structures also require ``graphviz``.
24+
25+
The easiest way to set up an environment is by installing [Anaconda](https://www.continuum.io/downloads).
26+
27+
### Installing packages with conda:
28+
If you already have a Python environment set up, and you are using the ``conda`` package manager, you can get all packages by running
29+
30+
conda install numpy scipy scikit-learn matplotlib pandas pillow graphviz
31+
32+
and then *also*
33+
34+
pip install graphviz
35+
36+
(Explanation: the conda package graphiz is the C library, not the python library)
37+
38+
### Installing packages with pip
39+
If you already have a Python environment and are using pip to install packages, you need to run
40+
41+
pip install numpy scipy scikit-learn matplotlib pandas pillow graphviz
42+
43+
You also need to install the graphiz C-library, which is easiest using a package manager.
44+
If you are using OS X and homebrew, you can ``brew install graphviz``. If you are on Ubuntu or debian, you can ``apt-get install graphviz``.
45+
Installing graphviz on Windows can be tricky and using conda / anaconda is recommended.
46+
1947
![cover](cover.jpg)

0 commit comments

Comments
 (0)