{"id":2356,"date":"2023-09-29T09:32:41","date_gmt":"2023-09-29T00:32:41","guid":{"rendered":"https:\/\/mindtech.jp\/?p=2356"},"modified":"2023-09-29T09:32:43","modified_gmt":"2023-09-29T00:32:43","slug":"post-2356","status":"publish","type":"post","link":"https:\/\/mindtech.jp\/?p=2356","title":{"rendered":"WSL2 Ubuntu\u74b0\u5883\u3067\u4f5c\u6210\u3057\u305fJupyterLab\u306e\u3001\u30b0\u30e9\u30d5\u306e\u65e5\u672c\u8a9e\u6587\u5b57\u5316\u3051\u3092\u4f55\u3068\u304b\u3059\u308b\u3002"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-mindtech wp-block-embed-mindtech\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"adVBIJHnUR\"><a href=\"https:\/\/mindtech.jp\/?p=2348\">WSL2 Ubuntu\u306e\u74b0\u5883\u306bPyCaret\u304c\u4f7f\u3048\u308bJupyterLab\u306e\u74b0\u5883\u3092\u4f5c\u308b<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;WSL2 Ubuntu\u306e\u74b0\u5883\u306bPyCaret\u304c\u4f7f\u3048\u308bJupyterLab\u306e\u74b0\u5883\u3092\u4f5c\u308b&#8221; &#8212; MindTech\" src=\"https:\/\/mindtech.jp\/?p=2348&#038;embed=true#?secret=L6L7TFkc2f#?secret=adVBIJHnUR\" data-secret=\"adVBIJHnUR\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u5b9f\u969b\u306b\u4f5c\u696d\u3092\u3057\u3066\u3044\u308b\u3068\u30b0\u30e9\u30d5\u3092\u63cf\u304f\u5fc5\u8981\u304c\u51fa\u3066\u304f\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u3044\u3056\u3001\u3084\u3063\u3066\u307f\u308b\u3068\u9805\u76ee\u306e\u6587\u5b57\u5316\u3051\u304c\u767a\u751f\u3059\u308b\u308f\u3051\u3067\u3059\u3002\u6587\u5b57\u5316\u3051\u3068\u3044\u3046\u3088\u308a\u306f\u8868\u793a\u3059\u308b\u30d5\u30a9\u30f3\u30c8\u306e\u554f\u984c\u3067\u3059\u3002<\/p>\n\n\n\n<p>Windows\u7248JupyterLab Desktop\u7248\u3092\u4f7f\u3063\u3066\u3044\u305f\u3053\u308d\u306f\u3001Windows\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u305f\u30d5\u30a9\u30f3\u30c8\u3092\u4f7f\u3048\u308b\u306e\u3067\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plt.rcParams&#91;\"font.family\"] = \"MS Gothic\"\r<\/code><\/pre>\n\n\n\n<p>\u306a\u3069\u3068\u66f8\u3044\u3066\u304a\u3051\u3070OK\u3067\u3057\u305f\u304c\u3001WSL2\u306e\u74b0\u5883\u3067\u306f\u7121\u529b\u3067\u3057\u305f\u3002\u4f5c\u696d\u81ea\u4f53\u306f\u6bcd\u8266\u306eWindows\u3067Chrome\u30d6\u30e9\u30a6\u30b6\u3092\u4f7f\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u52d5\u304b\u3057\u3066\u3044\u308b\u306e\u306fUbuntu\u3067\u3059\u304b\u3089\u306d\u3048\u3002<\/p>\n\n\n\n<p>\u65b9\u91dd\u3068\u3057\u3066\u306f\u3001IPA\u30d5\u30a9\u30f3\u30c8\u3092\u5165\u308c\u3066\u3001matplotlib\u306e\u8868\u793a\u8a2d\u5b9a\u3092\u305d\u308c\u306b\u5408\u308f\u305b\u308b\u3068\u3044\u3046\u4e8b\u3067\u30ec\u30c3\u30c4\u30fb\u30c8\u30e9\u30a4<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IPA\u30d5\u30a9\u30f3\u30c8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u81ea\u4f53\u306f apt \u3067\u884c\u3048\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b fc-list\u30b3\u30de\u30f3\u30c9\u3067\u30d5\u30a9\u30f3\u30c8\u30ea\u30b9\u30c8\u306b\u52a0\u308f\u3063\u305f\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tomi@ubuntu:~$ sudo  apt install fonts-ipaexfont\n\uff08\u4e2d\u7565\uff09\ntomi@ubuntu:~$ fc-list | grep 'IPA'\r\n\/usr\/share\/fonts\/opentype\/ipaexfont-gothic\/ipaexg.ttf: IPAexGothic,IPAex\u30b4\u30b7\u30c3\u30af:style=Regular\r\n\/usr\/share\/fonts\/opentype\/ipaexfont-mincho\/ipaexm.ttf: IPAexMincho,IPAex\u660e\u671d:style=Regular\r\n\/usr\/share\/fonts\/truetype\/fonts-japanese-mincho.ttf: IPAexMincho,IPAex\u660e\u671d:style=Regular\r\n\/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf: IPAexGothic,IPAex\u30b4\u30b7\u30c3\u30af:style=Regular<\/code><\/pre>\n\n\n\n<p>\u3042\u3068\u5ff5\u306e\u305f\u3081\u306bmatplotlib\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tomi@ubuntu:~$ ls ~\/.cache\/matplotlib\/fontlist-v330.json\r\n\/home\/tomi\/.cache\/matplotlib\/fontlist-v330.json\r\ntomi@ubuntu:~$ rm ~\/.cache\/matplotlib\/fontlist-v330.json<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4<\/h2>\n\n\n\n<p>\u307e\u305a\u306f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u78ba\u8a8d\u3057\u3066\u3044\u304d\u307e\u3059\u3002Jupyterlab\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306apython\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u74b0\u5883\u306b\u3088\u3063\u3066\u7570\u306a\u3063\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib\r\nprint(matplotlib.matplotlib_fname())<\/code><\/pre>\n\n\n\n<p>\u79c1\u306e\u5834\u5408\u306b\u306f\u3001\/home\/tomi\/anaconda3\/envs\/jupyterlab\/lib\/python3.8\/site-packages\/matplotlib\/mpl-data\/matplotlibrc\u3000\u307f\u305f\u3044\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u306e\u3067\u3001\u3053\u308c\u3092 vim \u306a\u308a emacs \u306a\u308a\u3067\u7de8\u96c6\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u76f4\u3059\u306e\u306f260\u884c\u76ee\u4ed8\u8fd1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Note that font.size controls default text sizes.  To configure\r\nspecial text sizes tick labels, axes, labels, title, etc., see the rc\r\nsettings for axes and ticks.  Special text sizes can be defined\r\nrelative to font.size, using the following values: xx-small, x-small,\r\nmall, medium, large, x-large, xx-large, larger, or smaller\r\n\r\nfont.family:  IPAexGothic  &lt;----- \u3053\u3053\u3092\u5909\u66f4\u3057\u3066\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\r\n#font.style:   normal\r\n#font.variant: normal\r\n#font.weight:  normal\r\n#font.stretch: normal\r\n#font.size:    10.0<\/code><\/pre>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u3067\u4f5c\u696d\u306f\u5b8c\u4e86\u3002\u5f8c\u306f\u9069\u5f53\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u7528\u610f\u3057\u3066\u65e5\u672c\u8a9e\u304c\u8868\u793a\u3055\u308c\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"568\" src=\"https:\/\/mindtech.jp\/wp-content\/uploads\/2023\/09\/image.png\" alt=\"\" class=\"wp-image-2357\" srcset=\"https:\/\/mindtech.jp\/wp-content\/uploads\/2023\/09\/image.png 638w, https:\/\/mindtech.jp\/wp-content\/uploads\/2023\/09\/image-300x267.png 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9f\u969b\u306b\u4f5c\u696d\u3092\u3057\u3066\u3044\u308b\u3068\u30b0\u30e9\u30d5\u3092\u63cf\u304f\u5fc5\u8981\u304c\u51fa\u3066\u304f\u308b\u308f\u3051\u3067\u3059\u304c\u3001\u3044\u3056\u3001\u3084\u3063\u3066\u307f\u308b\u3068\u9805\u76ee\u306e\u6587\u5b57\u5316\u3051\u304c\u767a\u751f\u3059\u308b\u308f\u3051\u3067\u3059\u3002\u6587\u5b57\u5316\u3051\u3068\u3044\u3046\u3088\u308a\u306f\u8868\u793a\u3059\u308b\u30d5\u30a9\u30f3\u30c8\u306e\u554f\u984c\u3067\u3059\u3002 Windows\u7248JupyterLab Desktop\u7248\u3092\u4f7f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3,6],"tags":[466,34],"class_list":["post-2356","post","type-post","status-publish","format-standard","hentry","category-3","category-6","tag-jupyterlab","tag-python"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4rHn0-C0","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2356"}],"version-history":[{"count":1,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2356\/revisions"}],"predecessor-version":[{"id":2358,"href":"https:\/\/mindtech.jp\/index.php?rest_route=\/wp\/v2\/posts\/2356\/revisions\/2358"}],"wp:attachment":[{"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindtech.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}