Skip to content

Commit 2b16bc6

Browse files
authored
fix matplotlib for windows (openvinotoolkit#1811)
1 parent 75466b3 commit 2b16bc6

File tree

35 files changed

+772
-111
lines changed

35 files changed

+772
-111
lines changed

notebooks/115-async-api/115-async-api.ipynb

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"metadata": {},
67
"source": [
@@ -31,6 +32,7 @@
3132
]
3233
},
3334
{
35+
"attachments": {},
3436
"cell_type": "markdown",
3537
"metadata": {},
3638
"source": [
@@ -59,8 +61,14 @@
5961
}
6062
],
6163
"source": [
64+
"import platform\n",
65+
"\n",
6266
"%pip install -q \"openvino>=2023.1.0\"\n",
63-
"%pip install -q opencv-python matplotlib"
67+
"%pip install -q opencv-python \n",
68+
"if platform.system() != \"windows\":\n",
69+
" %pip install -q \"matplotlib>=3.4\"\n",
70+
"else:\n",
71+
" %pip install -q \"matplotlib>=3.4,<3.7\""
6472
]
6573
},
6674
{
@@ -87,6 +95,7 @@
8795
]
8896
},
8997
{
98+
"attachments": {},
9099
"cell_type": "markdown",
91100
"metadata": {},
92101
"source": [
@@ -136,6 +145,7 @@
136145
]
137146
},
138147
{
148+
"attachments": {},
139149
"cell_type": "markdown",
140150
"metadata": {},
141151
"source": [
@@ -179,6 +189,7 @@
179189
]
180190
},
181191
{
192+
"attachments": {},
182193
"cell_type": "markdown",
183194
"metadata": {},
184195
"source": [
@@ -209,6 +220,7 @@
209220
]
210221
},
211222
{
223+
"attachments": {},
212224
"cell_type": "markdown",
213225
"metadata": {},
214226
"source": [
@@ -261,6 +273,7 @@
261273
]
262274
},
263275
{
276+
"attachments": {},
264277
"cell_type": "markdown",
265278
"metadata": {},
266279
"source": [
@@ -278,6 +291,7 @@
278291
]
279292
},
280293
{
294+
"attachments": {},
281295
"cell_type": "markdown",
282296
"metadata": {},
283297
"source": [
@@ -378,6 +392,7 @@
378392
]
379393
},
380394
{
395+
"attachments": {},
381396
"cell_type": "markdown",
382397
"metadata": {},
383398
"source": [
@@ -415,6 +430,7 @@
415430
]
416431
},
417432
{
433+
"attachments": {},
418434
"cell_type": "markdown",
419435
"metadata": {},
420436
"source": [
@@ -528,6 +544,7 @@
528544
]
529545
},
530546
{
547+
"attachments": {},
531548
"cell_type": "markdown",
532549
"metadata": {},
533550
"source": [
@@ -565,6 +582,7 @@
565582
]
566583
},
567584
{
585+
"attachments": {},
568586
"cell_type": "markdown",
569587
"metadata": {},
570588
"source": [
@@ -609,6 +627,7 @@
609627
]
610628
},
611629
{
630+
"attachments": {},
612631
"cell_type": "markdown",
613632
"metadata": {},
614633
"source": [
@@ -619,6 +638,7 @@
619638
]
620639
},
621640
{
641+
"attachments": {},
622642
"cell_type": "markdown",
623643
"metadata": {},
624644
"source": [
@@ -707,6 +727,7 @@
707727
]
708728
},
709729
{
730+
"attachments": {},
710731
"cell_type": "markdown",
711732
"metadata": {},
712733
"source": [

notebooks/120-tensorflow-object-detection-to-openvino/120-tensorflow-instance-segmentation-to-openvino.ipynb

+47-18
Large diffs are not rendered by default.

notebooks/120-tensorflow-object-detection-to-openvino/120-tensorflow-object-detection-to-openvino.ipynb

+44-15
Large diffs are not rendered by default.

notebooks/125-torchvision-zoo-to-openvino/125-lraspp-segmentation.ipynb

+8-1
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@
5959
},
6060
"outputs": [],
6161
"source": [
62+
"import platform\n",
63+
"\n",
6264
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu torch torchvision\n",
63-
"%pip install -q matplotlib\n",
65+
"\n",
66+
"if platform.system() != \"Windows\":\n",
67+
" %pip install -q \"matplotlib>=3.4\"\n",
68+
"else:\n",
69+
" %pip install -q \"matplotlib>=3.4,<3.7\"\n",
70+
"\n",
6471
"%pip install -q \"openvino>=2023.2.0\""
6572
]
6673
},

notebooks/126-tensorflow-hub/126-tensorflow-hub.ipynb

+35-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"metadata": {},
67
"source": [
@@ -13,7 +14,8 @@
1314
"\n",
1415
"You have the flexibility to run this tutorial notebook in its entirety or selectively execute specific sections, as each section operates independently.\n",
1516
"\n",
16-
"#### Table of contents:\n\n",
17+
"#### Table of contents:\n",
18+
"\n",
1719
"- [Image classification](#Image-classification)\n",
1820
" - [Install required packages](#Install-required-packages)\n",
1921
" - [Import libraries](#Import-libraries)\n",
@@ -32,6 +34,7 @@
3234
]
3335
},
3436
{
37+
"attachments": {},
3538
"cell_type": "markdown",
3639
"metadata": {},
3740
"source": [
@@ -40,6 +43,7 @@
4043
]
4144
},
4245
{
46+
"attachments": {},
4347
"cell_type": "markdown",
4448
"metadata": {},
4549
"source": [
@@ -51,6 +55,7 @@
5155
]
5256
},
5357
{
58+
"attachments": {},
5459
"cell_type": "markdown",
5560
"metadata": {},
5661
"source": [
@@ -73,11 +78,19 @@
7378
}
7479
],
7580
"source": [
76-
"%pip install -q tensorflow_hub tensorflow pillow numpy matplotlib\n",
77-
"%pip install -q \"openvino>=2023.2.0\""
81+
"import platform\n",
82+
"\n",
83+
"%pip install -q tensorflow_hub tensorflow pillow numpy\n",
84+
"%pip install -q \"openvino>=2023.2.0\"\n",
85+
"\n",
86+
"if platform.system() != \"Windows\":\n",
87+
" %pip install -q \"matplotlib>=3.4\"\n",
88+
"else:\n",
89+
" %pip install -q \"matplotlib>=3.4,<3.7\""
7890
]
7991
},
8092
{
93+
"attachments": {},
8194
"cell_type": "markdown",
8295
"metadata": {},
8396
"source": [
@@ -119,6 +132,7 @@
119132
]
120133
},
121134
{
135+
"attachments": {},
122136
"cell_type": "markdown",
123137
"metadata": {},
124138
"source": [
@@ -137,6 +151,7 @@
137151
]
138152
},
139153
{
154+
"attachments": {},
140155
"cell_type": "markdown",
141156
"metadata": {},
142157
"source": [
@@ -171,6 +186,7 @@
171186
]
172187
},
173188
{
189+
"attachments": {},
174190
"cell_type": "markdown",
175191
"metadata": {},
176192
"source": [
@@ -199,6 +215,7 @@
199215
]
200216
},
201217
{
218+
"attachments": {},
202219
"cell_type": "markdown",
203220
"metadata": {},
204221
"source": [
@@ -207,6 +224,7 @@
207224
]
208225
},
209226
{
227+
"attachments": {},
210228
"cell_type": "markdown",
211229
"metadata": {},
212230
"source": [
@@ -225,6 +243,7 @@
225243
]
226244
},
227245
{
246+
"attachments": {},
228247
"cell_type": "markdown",
229248
"metadata": {},
230249
"source": [
@@ -280,6 +299,7 @@
280299
]
281300
},
282301
{
302+
"attachments": {},
283303
"cell_type": "markdown",
284304
"metadata": {},
285305
"source": [
@@ -288,6 +308,7 @@
288308
]
289309
},
290310
{
311+
"attachments": {},
291312
"cell_type": "markdown",
292313
"metadata": {},
293314
"source": [
@@ -316,6 +337,7 @@
316337
]
317338
},
318339
{
340+
"attachments": {},
319341
"cell_type": "markdown",
320342
"metadata": {},
321343
"source": [
@@ -346,6 +368,7 @@
346368
]
347369
},
348370
{
371+
"attachments": {},
349372
"cell_type": "markdown",
350373
"metadata": {},
351374
"source": [
@@ -378,6 +401,7 @@
378401
]
379402
},
380403
{
404+
"attachments": {},
381405
"cell_type": "markdown",
382406
"metadata": {},
383407
"source": [
@@ -400,6 +424,7 @@
400424
]
401425
},
402426
{
427+
"attachments": {},
403428
"cell_type": "markdown",
404429
"metadata": {},
405430
"source": [
@@ -463,6 +488,7 @@
463488
]
464489
},
465490
{
491+
"attachments": {},
466492
"cell_type": "markdown",
467493
"metadata": {},
468494
"source": [
@@ -471,6 +497,7 @@
471497
]
472498
},
473499
{
500+
"attachments": {},
474501
"cell_type": "markdown",
475502
"metadata": {},
476503
"source": [
@@ -493,6 +520,7 @@
493520
]
494521
},
495522
{
523+
"attachments": {},
496524
"cell_type": "markdown",
497525
"metadata": {},
498526
"source": [
@@ -501,6 +529,7 @@
501529
]
502530
},
503531
{
532+
"attachments": {},
504533
"cell_type": "markdown",
505534
"metadata": {},
506535
"source": [
@@ -520,6 +549,7 @@
520549
]
521550
},
522551
{
552+
"attachments": {},
523553
"cell_type": "markdown",
524554
"metadata": {},
525555
"source": [
@@ -575,6 +605,7 @@
575605
]
576606
},
577607
{
608+
"attachments": {},
578609
"cell_type": "markdown",
579610
"metadata": {},
580611
"source": [
@@ -692,4 +723,4 @@
692723
},
693724
"nbformat": 4,
694725
"nbformat_minor": 4
695-
}
726+
}

0 commit comments

Comments
 (0)