{"id":54425,"date":"2018-05-24T07:32:07","date_gmt":"2018-05-23T22:32:07","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=54425"},"modified":"2024-05-06T11:47:45","modified_gmt":"2024-05-06T02:47:45","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91path%ef%bc%88%e3%83%91%e3%82%b9%ef%bc%89%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%99%e3%82%8b%e3%81%a3%e3%81%a6%e3%81%a9%e3%81%86%e3%81%84%e3%81%86%e3%81%93%e3%81%a8","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/54425","title":{"rendered":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac"},"content":{"rendered":"\n<p>\u4eca\u65e5\u306f\u3001Python\u3092\u4f7f\u3046\u524d\u306b\u3064\u307e\u305a\u304d\u3084\u3059\u3044PATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001<br><div class=\"box_voice\">\u305d\u3082\u305d\u3082Python\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01<br>\u306a\u3093\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\/\u30e9\u30a4\u30d6\u30e9\u30ea\/\u30d1\u30c3\u30b1\u30fc\u30b8\u3092import\u3067\u304d\u306a\u3044\u306e\uff01<\/div><\/p>\n\n\n\n<p>\u3068\u3044\u3063\u305f\u554f\u984c\u304c\u89e3\u6c7a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3064\u3044\u3067\u306bPATH\u3064\u306a\u304c\u308a\u3067\u3001Python 3.4\u4ee5\u964d\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305fpathlib\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002\u672c\u5f53\u306b\u3001\u3042\u306a\u305f\u306e\u554f\u984c\u306f\u89e3\u6c7a\u3067\u304d\u308b\u306e\u304b\uff01\uff1f\u3000\u884c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3092\u8aad\u3080\u524d\u306b\u3001Python\u304c\u3069\u3093\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306a\u306e\u304b\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u304a\u304d\u305f\u3044\u4eba\u306f\u6b21\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u2192&nbsp;<a href=\"https:\/\/www.sejuku.net\/blog\/7720\">Python\u3068\u306f\uff1f\u7279\u5fb4\u3084\u3067\u304d\u308b\u3053\u3068\u3001\u6d3b\u7528\u4f8b\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u7c21\u5358\u306b\u89e3\u8aac<\/a><\/p>\n\n\n\n<p>\u306a\u304a\u3001\u305d\u306e\u4ed6\u306ePython\u306e\u8a18\u4e8b\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/www.sejuku.net\/blog\/147190\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u306b\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PATH\uff08\u30d1\u30b9\uff09\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3088\u3046<\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306fPython\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u52d5\u304b\u306a\u3044\u5834\u5408\u306e\u5bfe\u51e6\u6cd5\u3068\u3057\u3066\u3001<br><div class=\"box01\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Python\u304c\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u306ePATH\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5<\/b><\/li>\n\n\n\n<li><b>\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306ePATH\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5<\/b><\/li>\n<\/ul>\n\n\n\n<p><\/div><br>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PATH\uff08\u30d1\u30b9\uff09\u306e\u8a2d\u5b9a\u304c\u9593\u9055\u3063\u3066\u3044\u308b\uff1f<\/h3>\n\n\n\n<p>Python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u52d5\u304b\u306a\u3044\u539f\u56e0\u3068\u3057\u3066\u3001<\/p>\n\n\n\n<p><div class=\"box_voice\">PATH\u306e\u8a2d\u5b9a\u304c\u9593\u9055\u3063\u3066\u3044\u308b\u306e\u304b\u306a\uff1f<\/div><\/p>\n\n\n\n<p>\u3068\u3044\u3046\u7d50\u8ad6\u306b\u81f3\u3063\u305f\u3068\u304d\u3001\u3069\u308c\u3060\u3051\u306e\u4eba\u304c\u6b63\u3057\u304f\u554f\u984c\u3092\u5207\u308a\u5206\u3051\u3089\u308c\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u304b\u3002\u5b9f\u306f\u3001Python\u3067\u300cPATH\u306e\u8a2d\u5b9a\u304c\u9593\u9055\u3063\u3066\u3044\u308b\u300d\u3068\u8a00\u308f\u308c\u308b\u30b1\u30fc\u30b9\u306f\u30012\u3064\u3042\u308a\u307e\u3059\u3002<br><div class=\"box01\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>\uff081\uff09Python\u304c\u8d77\u52d5\u3057\u306a\u3044\u30b1\u30fc\u30b9<\/b><\/li>\n\n\n\n<li><b>\uff082\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u30b1\u30fc\u30b9<\/b><\/li>\n<\/ul>\n\n\n\n<p><\/div><br>\u307e\u305a\u306f\u3001\u554f\u984c\u306e\u5207\u308a\u5206\u3051\u304c\u6b63\u3057\u304f\u3067\u304d\u306a\u3044\u3068\u3001\u89e3\u6c7a\u3082\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u9806\u756a\u306b\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\uff081\uff09Python\u304c\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u306ePATH\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3088\u3046<\/h3>\n\n\n\n<p>\u300cpython\u300d\u3068\u5165\u529b\u3057\u305f\u3068\u304d\u306b\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bPython\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u304c\u8d77\u52d5\u3059\u308b\u306f\u305a\u304c\u2026<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(OpenCV) D:&gt;python\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt;<\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<p>Windows\u306e\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">D:&gt;python\n'python' \u306f\u3001\u5185\u90e8\u30b3\u30de\u30f3\u30c9\u307e\u305f\u306f\u5916\u90e8\u30b3\u30de\u30f3\u30c9\u3001\n\u64cd\u4f5c\u53ef\u80fd\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u307e\u305f\u306f\u30d0\u30c3\u30c1 \u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/pre>\n\n\n\n<p>Linux\u306e\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user@xxxxxx:~$ python\nbash: python: \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3042\u308a\u307e\u305b\u3093<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\uff081-1\uff09\u89e3\u6c7a\u3059\u308b\u306b\u306f\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff01<\/h4>\n\n\n\n<p>\u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001Python\u3092\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n            <a href=\"https:\/\/www.sejuku.net\/blog\/33294\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/python_install-150x85.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">Python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3092OS\u5225\u306b\u89e3\u8aac\uff08Windows\u30fbMac\u30fbLinux\uff09<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n\n\n\n<h4 class=\"wp-block-heading\">\uff081-2\uff09\u305d\u308c\u3067\u30c0\u30e1\u306a\u3089\u2026<\/h4>\n\n\n\n<p>\u3082\u3046\u4e00\u5ea6\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082\u30c0\u30e1\u306a\u5834\u5408\u306f\u3001\u74b0\u5883\u5909\u6570PATH\u306e\u8a2d\u5b9a\u3092\u898b\u76f4\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002\u305f\u3060\u3001\u3042\u306a\u305f\u306e\u74b0\u5883\u3067Python\u304c\u3069\u3053\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u8fd1\u304f\u306e\u5c02\u9580\u5bb6\u306b\u76f8\u8ac7\u3059\u308b\u306e\u304c\u8fd1\u9053\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\uff082\uff09\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306ePATH\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3088\u3046<\/h3>\n\n\n\n<p>\u300cpython\u300d\u3068\u5165\u529b\u3059\u308b\u3068Python\u306f\u8d77\u52d5\u3067\u304d\u308b\u3051\u3069\u3001\u7d9a\u3051\u3066\u300cimport mymodule\u300d\u3068\u5165\u529b\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f55\u3082\u8868\u793a\u3055\u308c\u306a\u3044\u306f\u305a\u304c\u2026<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(OpenCV) D:&gt;python\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import mymodule\n&gt;&gt;&gt;<\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u72b6\u614b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(OpenCV) D:&gt;python\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import mymodule\nTraceback (most recent call last):\n  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\nModuleNotFoundError: No module named 'mymodule'\n&gt;&gt;&gt;<\/pre>\n\n\n\n<p>\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u65b9\u6cd5\u306f\u30013\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\uff082-1\uff09pth\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3088\u3046<\/h4>\n\n\n\n<p>\u62e1\u5f35\u5b50\u304cpth\u306e\u30d5\u30a1\u30a4\u30eb\uff08\u4f8b\uff1amymodule.pth\u3002\u4ee5\u964d\u3001pth\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u3001<b>site-package\u30d5\u30a9\u30eb\u30c0\u306b\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/b>\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u3001Anaconda\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u300cC:UsersXXXXXXAnaconda3envsOpenCVLibsite-packages\u300d\u30d5\u30a9\u30eb\u30c0\u306bpth\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>mymodule.py\u304c\u300cD:mymodule-folder\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001pth\u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">D:mymodule-folder<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30d5\u30a9\u30eb\u30c0\u540d\u3092\u30c9\u30e9\u30a4\u30d6\u540d\u304b\u3089\u5168\u90e8\u66f8\u304d\u307e\u3059\u3002site-package\u30d5\u30a9\u30eb\u30c0\u306bpth\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u6539\u3081\u3066Python\u3092\u8d77\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\uff082-2\uff09\u74b0\u5883\u5909\u6570PYTHONPATH\u3092\u8a2d\u5b9a\u3057\u3088\u3046<\/h4>\n\n\n\n<p>site-packages\u30d5\u30a9\u30eb\u30c0\u304c\u5206\u304b\u3089\u306a\u3044\u3068\u304d\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u3066\u74b0\u5883\u5909\u6570PYTHONPATH\u3092\u8a2d\u5b9a\u3057\u3066\u304b\u3089\u3001Python\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3084\u306f\u308a\u3001mymodule.py\u304c\u300cD:mymodule-folder\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(OpenCV) D:&gt;set PYTHONPATH=%PYTHONPATH%;D:mymodule-folder\n\n(OpenCV) D:PyCharmpath-test&gt;python\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import mymodule\n&gt;&gt;&gt;<\/pre>\n\n\n\n<p>PYTHONPATH\u306f\u3001Python\u3092\u8d77\u52d5\u3059\u308b\u524d\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\uff082-3\uff09\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u6700\u521d\u306bsys.path\u3067\u8a2d\u5b9a\u3057\u3088\u3046<\/h4>\n\n\n\n<p>\u3044\u307e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3044\u308b\u30d1\u30bd\u30b3\u30f3\u3067\u3057\u304b\u52d5\u4f5c\u3055\u305b\u306a\u3044\uff01\u30d5\u30a9\u30eb\u30c0\u69cb\u6210\u3082\u5909\u3048\u306a\u3044\uff01\u3068\u3044\u3046\u306e\u3067\u3042\u308c\u3070\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u6700\u521d\u306bsys.path\u3067\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002\u975e\u5e38\u306b\u9650\u5b9a\u7684\u306a\u306e\u3067\u30aa\u30b9\u30b9\u30e1\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>Python\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">(OpenCV) D:&gt;python\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import sys\n&gt;&gt;&gt; sys.path.append(\"D:mymodule-folder\")\n&gt;&gt;&gt; import mymodule\n&gt;&gt;&gt;<\/pre>\n\n\n\n<p>\u5b9f\u306f\u3001\uff082-1\uff09pth\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3082\u3001\uff082-2\uff09\u74b0\u5883\u5909\u6570PYTHONPATH\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3082\u3001Python\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3092\u8d77\u52d5\u3059\u308b\u3068\u304d\u306bsys.path\u3092\u521d\u671f\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3064\u307e\u308a\u3001\u3044\u305a\u308c\u306b\u305b\u3088sys.path\u306b\u300cD:mymodule-folder\u300d\u3092\u767b\u9332\u3059\u308c\u3070\u3088\u304b\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u306e\u3067\u3059\u304c\u3001\u79c1\u306e\u30aa\u30b9\u30b9\u30e1\u306f\uff082-1\uff09pth\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\u305c\u3072\u8a66\u3057\u3066\u898b\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d7\u30ed\u30b0\u30e9\u30e0\u3067PATH\u3092\u64cd\u4f5c\u3057\u3066\u307f\u3088\u3046<\/h2>\n\n\n\n<p>\u3055\u3066\u3001\u3064\u3044\u3067\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067PATH\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u3082\u8efd\u304f\u7d39\u4ecb\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u304b\u3089\u8aac\u660e\u3059\u308b\u5185\u5bb9\u306f\u3001Python\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fPATH\u3082\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308bPATH\u3082\u95a2\u4fc2\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u307e\u3063\u305f\u304f\u65b0\u3057\u3044\u6c17\u6301\u3061\u3067\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u5b58\u5728\u3092\u78ba\u8a8d\u3059\u308b<\/h3>\n\n\n\n<p>exists()\u304c\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:filename.txt\")\n\nif path.exists():\n    print(\"\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\")\nelse:\n    print(\"\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u305b\u3093\u3002\")<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u53d6\u5f97\u3059\u308b\/\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<p>\u6614\u306f\u3001os.path.split()\u3092\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u306d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:\/path1\/path2\/filename.txt\")\n\nprint(path.parent)\nprint(path.name)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u6307\u5b9a\u3057\u305f\u30d1\u30b9\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u4e00\u89a7\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n\n\n\n<p>os.walk()\u3092\u4f7f\u3063\u3066\u66f8\u3044\u3066\u3044\u305f\u30a2\u30ec\u3067\u3059\u3002<\/p>\n\n\n\n<p>pathlib\u3067\u306f\u3001iterdir()\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:\/path1\")\n\nfor child in path.iterdir():\n   print(child)<\/pre>\n\n\n\n<p>\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5bfe\u8c61\u306b\u3057\u305f\u308a\u3001\u62e1\u5f35\u5b50\u3092\u5236\u9650\u3059\u308b\u3068\u304d\u306fglob()\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:\/path1\")\n\nfor child in path.glob(\"**\"): # \u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5bfe\u8c61\u3068\u3059\u308b\n   print(child)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d1\u30b9\u3092\u6b63\u898f\u5316\u3059\u308b<\/h3>\n\n\n\n<p>\u201c..\u201d\u3092\u9664\u53bb\u3057\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>os.path.normpath()\u3067\u3084\u3063\u3066\u3044\u307e\u3057\u305f\u306d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:\/path1\/..\/path2\/..\/path3\")\n\nprint(path)\n\npath = path.resolve()\n\nprint(path)<\/pre>\n\n\n\n<p>\u305d\u3082\u305d\u3082&#8221;A\/\/B&#8221;\u3068\u304b&#8221;A\/B\/&#8221;\u3001&#8221;A\/.\/B&#8221;\u306f\u3001pathlib.Path()\u306e\u6642\u70b9\u3067\u6b63\u898f\u5316\u3055\u308c\u307e\u3059\u306d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d1\u30b9\u3092\u5206\u5272\u3059\u308b<\/h3>\n\n\n\n<p>\u300cD:path1path2path3\u300d\u3092\u300c(&#8216;D:&#8217;, &#8216;path1&#8217;, &#8216;path2&#8217;, &#8216;path3&#8217;)\u300d\u306b\u5206\u5272\u3059\u308b\u306b\u306f\u3001parts\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import pathlib\npath = pathlib.Path(\"D:\/path1\/path2\/path3\")\n\nprint(path.parts)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u3001Python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u52d5\u304b\u306a\u3044\u539f\u56e0\u304c\u300cPATH\u306e\u8a2d\u5b9a\u304c\u9593\u9055\u3063\u3066\u3044\u308b\u304b\u306a\uff1f\u300d\u3068\u601d\u3063\u305f\u3068\u304d\u306e\u5bfe\u51e6\u65b9\u6cd5\u3068\u3057\u3066\u3001\u5927\u304d\u304f2\u3064\u306e\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<br><div class=\"box01\"><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>1\u3064\u76ee\u306fPython\u304c\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408<\/b><\/li>\n\n\n\n<li><b>2\u3064\u76ee\u306f\u30e2\u30b8\u30e5\u30fc\u30eb\u3092import\u3067\u304d\u306a\u3044\u5834\u5408<\/b><\/li>\n<\/ul>\n\n\n\n<p><\/div><br>\u3069\u3061\u3089\u3082\u8868\u793a\u3055\u308c\u308b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3068\u3001\u5bfe\u5fdc\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u3053\u306e2\u3064\u3067\u3042\u308c\u3070\u30b5\u30c3\u3068\u89e3\u6c7a\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u3064\u3044\u3067\u306bPython\u306e\u30d1\u30b9\u3092\u64cd\u4f5c\u3059\u308bpathlib\u306e\u4f7f\u3044\u65b9\u3092\u8efd\u304f\u7d39\u4ecb\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u3001Python\u306ePATH\u554f\u984c\u304c\u307b\u3068\u3093\u3069\u89e3\u6c7a\u3067\u304d\u308b\uff01\u3068\u4fe1\u3058\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u3067\u306f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u306f\u3001Python\u3092\u4f7f\u3046\u524d\u306b\u3064\u307e\u305a\u304d\u3084\u3059\u3044PATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u305d\u3082\u305d\u3082Python\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\u306a\u3093\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\/\u30e9\u30a4\u30d6\u30e9\u30ea\/\u30d1\u30c3\u30b1\u30fc\u30b8\u3092import\u3067\u304d\u306a\u3044\u306e\uff01 \u3068 [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":61436,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2350],"tags":[49],"class_list":["post-54425","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-study","tag-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/54425\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/54425\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-23T22:32:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:47:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac\",\"datePublished\":\"2018-05-23T22:32:07+00:00\",\"dateModified\":\"2024-05-06T02:47:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425\"},\"wordCount\":181,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/image-125.jpg\",\"keywords\":[\"python\"],\"articleSection\":[\"Python\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425\",\"name\":\"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/image-125.jpg\",\"datePublished\":\"2018-05-23T22:32:07+00:00\",\"dateModified\":\"2024-05-06T02:47:45+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/image-125.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/image-125.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/54425#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/54425","og_locale":"ja_JP","og_type":"article","og_title":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/54425","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2018-05-23T22:32:07+00:00","article_modified_time":"2024-05-06T02:47:45+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/54425#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/54425"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac","datePublished":"2018-05-23T22:32:07+00:00","dateModified":"2024-05-06T02:47:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/54425"},"wordCount":181,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/54425#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg","keywords":["python"],"articleSection":["Python\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/54425","url":"https:\/\/www.sejuku.net\/blog\/54425","name":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/54425#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/54425#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg","datePublished":"2018-05-23T22:32:07+00:00","dateModified":"2024-05-06T02:47:45+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/54425#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/54425"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/54425#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/05\/image-125.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/54425#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u304c\u8d77\u52d5\u3057\u306a\u3044\uff01\uff1f\u305d\u3093\u306a\u3068\u304d\u306ePATH\uff08\u30d1\u30b9\uff09\u8a2d\u5b9a\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u89e3\u8aac"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/54425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=54425"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/54425\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/61436"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=54425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=54425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=54425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}