質問編集履歴
2
少し前の変更は間違えました
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,33 +8,35 @@
|
|
8
8
|
|
9
9
|
```lang-python
|
10
10
|
|
11
|
-
ModuleNotFoundError Traceback (most recent call last)
|
12
11
|
|
13
|
-
<ipython-input-2-790db3fca658> in <module>()
|
14
12
|
|
15
|
-
1 import mglearn
|
16
13
|
|
17
|
-
2 import sys
|
18
14
|
|
15
|
+
---------------------------------------------------------------------------
|
16
|
+
|
17
|
+
AttributeError Traceback (most recent call last)
|
18
|
+
|
19
|
+
<ipython-input-10-68d9ec4b28dc> in <module>()
|
20
|
+
|
19
|
-
---->
|
21
|
+
----> 1 mglearn.plots.plot_animal_tree()
|
20
22
|
|
21
23
|
|
22
24
|
|
23
25
|
C:\Anaconda3\lib\site-packages\mglearn\plot_animal_tree.py in plot_animal_tree(ax)
|
24
26
|
|
25
|
-
4
|
26
|
-
|
27
|
-
5 def plot_animal_tree(ax=None):
|
28
|
-
|
29
|
-
----> 6 import graphviz
|
30
|
-
|
31
27
|
7 if ax is None:
|
32
28
|
|
33
29
|
8 ax = plt.gca()
|
34
30
|
|
31
|
+
----> 9 mygraph = graphviz.Digraph(node_attr={'shape': 'box'},
|
32
|
+
|
33
|
+
10 edge_attr={'labeldistance': "10.5"},
|
34
|
+
|
35
|
+
11 format="png")
|
35
36
|
|
36
37
|
|
38
|
+
|
37
|
-
|
39
|
+
AttributeError: module 'graphviz' has no attribute 'Digraph'
|
38
40
|
|
39
41
|
```
|
40
42
|
|
1
最初Attributeerror と記載していましたが、いろいろ施行する前のエラーを写してしまって、正しくはModuleNotFoundErrorです。
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,29 +8,33 @@
|
|
8
8
|
|
9
9
|
```lang-python
|
10
10
|
|
11
|
-
|
11
|
+
ModuleNotFoundError Traceback (most recent call last)
|
12
12
|
|
13
|
-
<ipython-input-
|
13
|
+
<ipython-input-2-790db3fca658> in <module>()
|
14
14
|
|
15
|
+
1 import mglearn
|
16
|
+
|
17
|
+
2 import sys
|
18
|
+
|
15
|
-
---->
|
19
|
+
----> 3 mglearn.plots.plot_animal_tree()
|
16
20
|
|
17
21
|
|
18
22
|
|
19
23
|
C:\Anaconda3\lib\site-packages\mglearn\plot_animal_tree.py in plot_animal_tree(ax)
|
20
24
|
|
25
|
+
4
|
26
|
+
|
27
|
+
5 def plot_animal_tree(ax=None):
|
28
|
+
|
29
|
+
----> 6 import graphviz
|
30
|
+
|
21
31
|
7 if ax is None:
|
22
32
|
|
23
33
|
8 ax = plt.gca()
|
24
34
|
|
25
|
-
----> 9 mygraph = graphviz.Digraph(node_attr={'shape': 'box'},
|
26
|
-
|
27
|
-
10 edge_attr={'labeldistance': "10.5"},
|
28
|
-
|
29
|
-
11 format="png")
|
30
35
|
|
31
36
|
|
32
|
-
|
33
|
-
|
37
|
+
ModuleNotFoundError: No module named 'graphviz'
|
34
38
|
|
35
39
|
```
|
36
40
|
|