{"id":225439,"date":"2020-12-04T08:29:50","date_gmt":"2020-12-04T00:29:50","guid":{"rendered":"http:\/\/4563.org\/?p=225439"},"modified":"2020-12-04T08:29:50","modified_gmt":"2020-12-04T00:29:50","slug":"mac-vscode-remote-%e8%bf%9c%e7%a8%8b%e6%98%be%e7%a4%ba-matplotlib-%e5%9b%be%e5%83%8f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=225439","title":{"rendered":"Mac Vscode Remote \u8fdc\u7a0b\u663e\u793a matplotlib \u56fe\u50cf"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Mac Vscode Remote \u8fdc\u7a0b\u663e\u793a matplotlib \u56fe\u50cf               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Bolvvv <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4f7f\u7528\u573a\u666f\u662f\u5728 M1 \u7684 mac \u4e0a\u9762\uff0c\u7528 vscode remote-ssh \u8fde\u63a5\u5b9e\u9a8c\u5ba4\u670d\u52a1\u5668\uff08 ubuntu16.04 \uff09\uff0c\u505a\u6df1\u5ea6\u5b66\u4e60\u76f8\u5173\u7684\u4e1c\u897f\uff0c\u7528 pyplot \u5c06\u56fe\u7247\u663e\u793a\u5728 mac \u4e0a\u3002 \u76ee\u524d\u5728\u7f51\u4e0a\u641c\u5230\u7684\u7a0d\u5fae\u9760\u8c31\u70b9\u7684\u6559\u7a0b\uff1a https:\/\/www.jianshu.com\/p\/b143f0fac9da \u4f46\u662f\u4ecd\u7136\u65e0\u6cd5\u4f7f\u7528\u3002 \u672c\u8d28\u4e0a\u662f\u5e94\u8be5\u662f\u5c06 linux \u7684\u56fe\u50cf\u8f6c\u53d1\u5230 mac \u4e0a\u3002\u770b\u5230\u7f51\u4e0a\u633a\u591a linux \u8f6c\u53d1\u5230 windows \u7684\u6559\u7a0b\uff0c\u8f6c\u53d1\u5230 mac \u5c31\u5f88\u5c11\u4e86\u3002\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u5927\u4f6c\u8e29\u8fc7\u5751\uff0c\u80fd\u8bb2\u4e00\u8bb2\u600e\u4e48\u89e3\u51b3\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>16<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4558353\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Aspector <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u662f\u7528\u7684 jupyter notebook\uff0c\u7528 ssh tunnel \u76f4\u63a5\u8fde\uff08\u73b0\u5728 vs code \u597d\u50cf\u4e5f\u80fd\u76f4\u63a5\u5f00\u670d\u52a1\u5668\u4e0a\u7684 notebook \u4e86\uff09\uff0c\u5c31\u662f\u6253\u5f00\u7684\u65f6\u5019\u6709\u70b9\u5361&#8230;\u6211\u53ea\u662f\u63a5\u89e6\u8fc7\u4e00\u70b9\u673a\u5668\u5b66\u4e60\u7684\u76ae\u6bdb\uff0c\u4e0d\u77e5\u9053 jupyter \u80fd\u4e0d\u80fd\u6ee1\u8db3\u4f60\u7684\u9700\u6c42                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558354\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : NoobX <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Jupiter notebook \u670d\u52a1\u5668\u5c31\u884c\u4e86\u5427<br \/>VS remote \u7740\u624b\u4e0d\u597d\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558355\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lovestudykid <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 jupyter notebook\uff0cvscode \u539f\u751f\u652f\u6301\uff0c\u5e76\u4e14\u53ef\u4ee5\u8fde\u63a5\u8fdc\u7a0b jupyter server\uff0c\u4e0d\u9700\u8981 ssh remote                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558356\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Bolvvv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Aspector <br \/>@NoobX <br \/>@lovestudykid <br \/>\u5fd8\u8bb0\u505a\u8865\u5145\uff0c\u76ee\u524d\u8fdc\u7a0b\u770b\u56fe\u7247\u5c31\u662f\u7528\u7684 jupyter\uff0c\u4e0d\u8fc7\u7531\u4e8e\u81ea\u5df1\u7684\u95ee\u9898\uff0c\u59cb\u7ec8\u4e0d\u592a\u4e60\u60ef jupyter \u7684\u64cd\u4f5c\u903b\u8f91\uff0c\u8fd8\u662f\u89c9\u5f97\u5e38\u89c4\u7f16\u8f91\u5668\u7528\u7740\u66f4\u987a\u624b\u4e00\u4e9b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558357\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lovestudykid <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Bolvvv \u5728 vscode \u91cc\u7528 jupyter                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558358\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcdtyph <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             M1 \u53ef\u4ee5\u5b89\u88c5 Xquartz \u4e48\uff1f<br \/>\u53ef\u4ee5\u7684\u8bdd\u628a\u90a3\u4e2a\u6559\u7a0b\u91cc\u7684 ssh -X \u6539\u6210 ssh -Y                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558359\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zooo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u540c\u6837\u505a\u6df1\u5ea6\u5b66\u4e60\uff0clz \u641c\u641c vision\uff0c\u6211\u89c9\u5f97\u8fd8\u633a\u597d\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558360\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mgrddsj <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u4e60\u60ef Jupyter\uff0c\u4f46\u662f\u4e34\u65f6\u60f3\u663e\u793a matplotlib \u7684\u56fe\u7684\u8bdd\uff0c\u53ef\u4ee5\u5728\u5f53\u524d py \u6587\u4ef6\u6700\u524d\u9762\u52a0 #%% \uff0c\u8fd9\u6837\u5c31\u76f8\u5f53\u4e8e\u521b\u5efa\u4e86\u4e00\u4e2a jupyter notebook \u7684 cell\uff0c\u70b9\u4e0a\u65b9\u51fa\u73b0\u7684 run cell \u6216\u8005 Ctrl (Command)+Enter\uff0c\u4f1a\u4f7f\u7528 Python interactive console \u6765\u8dd1\u8fd9\u6bb5\u4ee3\u7801\uff0c\u56fe\u4f1a\u76f4\u63a5\u51fa\u73b0\u5728\u90a3\u4e2a console \u91cc\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558361\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Bolvvv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcdtyph \u5148\u770b\u770b\u5927\u5bb6\u8fd8\u6709\u6ca1\u6709\u4ec0\u4e48\u597d\u529e\u6cd5\u3002\u4e4b\u524d\u5728 x86 \u7684 mac \u4e0b\u6298\u817e\uff0c\u6700\u540e\u4e0d\u77e5\u9053\u662f\u5565\u8bbe\u7f6e\u51fa\u9519\u4e86\uff0c\u5bfc\u81f4\u5373\u4f7f\u4e0d\u663e\u793a\u56fe\u7247 pyplot \u90fd\u65e0\u6cd5\u4f7f\u7528\uff0c\u73b0\u5728\u5bf9\u8fd9\u4e2a\u65b9\u6cd5\u6709\u70b9\u754f\u60e7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558362\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Bolvvv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zooo \u80fd\u5426\u518d\u8be6\u7ec6\u8bf4\u4e00\u4e0b\u5462\uff1f\u53ea\u641c vision \u7684\u8bdd\uff0c\u4f3c\u4e4e\u53ea\u627e\u5230\u4e86 google \u7684 python-vision                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558363\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zooo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Bolvvv https:\/\/github.com\/pytorch\/vision                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558364\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : superlc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u628a\u56fe\u7247\u5b58\u5230\u786c\u76d8\uff0cvscode \u76f4\u63a5\u6253\u5f00\u56fe\u7247                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558365\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : haiyang1992 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             iterm2 \u6709\u4e00\u5957\u5de5\u5177\u53ef\u4ee5\u88c5\u5230\u670d\u52a1\u5668\u4e0a\uff0c\u91cc\u9762\u6709\u4e00\u4e2a imgcat \u53ef\u4ee5\u5728 terminal \u91cc\u663e\u793a\u56fe\u7247                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558366\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuruizhe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @haiyang1992 \u540c+1\uff0c\u8df3\u677f\u673a\u4e0d\u597d\u5f04\uff0c\u800c\u4e14\u670d\u52a1\u5668\u4e0a matplotlib \u7684 backend \u53ea\u6709 Agg\uff0c\u53ea\u80fd saveimg \u518d imgcat                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558367\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : visitant <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bd5\u8bd5 x11 forward \u5427,\u4e0d\u786e\u5b9a\u73b0\u5728\u7684 remote-ssh \u80fd\u4e0d\u80fd\u652f\u6301 x11 forward,\u5927\u6982\u534a\u5e74\u524d\u8fd8\u4e0d\u592a\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4558368\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Liyiw <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pyplot \u628a\u56fe\u7247\u5199\u4e0b\u6765\u5427\uff0c\u624b\u52a8\u6253\u5f00\u6587\u4ef6\u770b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Mac Vscode Remote&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/225439"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225439"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/225439\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225439"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}