{"id":1967,"date":"2012-11-13T21:54:06","date_gmt":"2012-11-13T12:54:06","guid":{"rendered":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/?p=1967"},"modified":"2012-11-13T21:54:06","modified_gmt":"2012-11-13T12:54:06","slug":"os-x-server-%e3%81%a7-python","status":"publish","type":"post","link":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/2012\/1967","title":{"rendered":"OS X Server \u3067 python"},"content":{"rendered":"<p>\u6065\u305a\u304b\u3057\u306a\u304c\u3089\u4eca\u307e\u3067\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/developer.apple.com\/library\/ios\/documentation\/FileManagement\/Conceptual\/FileSystemProgrammingGUide\/FileSystemOverview\/FileSystemOverview.html#\/\/apple_ref\/doc\/uid\/TP40010672-CH2-SW15\">Domains Determine the Placement of Files<\/a> + \u03b1\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u57fa\u672c\u7684\u306b\u4ee5\u4e0b\u306e\u3088\u30fc\u306a\u30dd\u30ea\u30b7\u30fc\u3067 OS X \u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\/bin;\/sbin;\/usr\/bin;\/usr\/sbin;\/usr\/lib;\/usr\/libexec;\/System\/Library \u306b\u306f\u624b\u3092\u89e6\u308c\u306a\u3044<\/li>\n<li>\u6975\u529b OS \u6a19\u6e96\u306e\u30bd\u30d5\u30c8\u3092\u4f7f\u3046<\/li>\n<li>\u8ffd\u52a0\u3067\u306a\u306b\u304b\u5165\u308c\u305f\u3044\u3068\u304d\u306f pkgsrc \u3092\u4f7f\u3046<span style=\"color: #888888;\">(\u2192 \/usr\/pkg)<\/span><\/li>\n<li>pkgsrc \u306b\u306a\u304b\u3063\u305f\u3089\u3001\u6975\u529b\u81ea\u5206\u3067 local\/*** \u00a0\u3063\u3066\u00a0pkg \u3092\u4f5c\u3063\u3066\u5165\u308c\u308b<span style=\"color: #888888;\">(\u2192 \/usr\/pkg)<\/span><\/li>\n<li>\u00a0\u3069\u3046\u3057\u3088\u3046\u3082\u306a\u3044\u3068\u304d\u3060\u3051\u81ea\u5206\u3067\u9811\u5f35\u308b<span style=\"color: #888888;\">( \u2192 \/usr\/local)<\/span><\/li>\n<\/ol>\n<p>OS X Server \u306e\u5834\u5408\u3001 apache \u306f 2 \u306e\u30eb\u30fc\u30eb\u3001 python \u306f 3 \u306e\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066<span style=\"color: #888888;\">(Package \u3092\u8ffd\u52a0\u3059\u308b\u3068 1. \u306e\u30eb\u30fc\u30eb\u306b\u62b5\u89e6(?)\u3057\u3061\u3083\u3046\u3093\u3060\u3082\u306e)<\/span>\u4fbf\u5229\u306b\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u307e\u3041\u3001\u305d\u3093\u306a\u53b3\u5bc6\u306b\u3084\u3063\u3066\u305f\u308f\u3051\u3067\u3082\u306a\u3044\u3093\u3067\u3059\u304c\u3002<\/p>\n<p>\u3068\u3053\u308d\u304c\u3001 apache \u3068 python \u3092\u9023\u52d5\u3055\u305b\u3088\u3046\u3068\u3059\u308b\u3068\u3001 OS \u6a19\u6e96\u306e apache \u306f\u305d\u308a\u3083\u3082\u3061\u308d\u3093 OS \u6a19\u6e96\u306e python \u3068\u9023\u52d5\u3057\u3088\u3046\u3068\u3059\u308b\u306e\u3060\u3051\u3069\u3001\u666e\u6bb5\u4ffa\u304c\u4f7f\u3063\u3066\u308b python \u306f pkgsrc \u306e python \u306a\u306e\u3067 OS \u6a19\u6e96\u306e python \u306b\u306f\u4f55\u3082 Package \u304c\u5165\u3063\u3066\u304a\u3089\u305a\u3001\u3084\u308a\u305f\u3044\u3053\u3068\u304c\u4f55\u4e00\u3064\u3067\u304d\u306a\u3044\u3001\u3068\u3044\u3046\u72b6\u6cc1\u306b\u9665\u3063\u305f\u306e\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057 OS \u6a19\u6e96\u306e python \u306b Package \u3092\u8ffd\u52a0\u3057\u3066 1. \u306e\u30eb\u30fc\u30eb\u3092\u5b88\u308c\u306a\u3044\u306e\u306f\u5acc\u306a\u306e\u3067\u3001\u306a\u3093\u3068\u304b Package \u3092 \/usr\/local \u4ee5\u4e0b\u306b\u5165\u308c\u3089\u308c\u306a\u3044\u304b\u306a\u3041\u3001\u3068\u304b\u60a9\u3093\u3067\u3044\u305f\u306e\u3067\u3059\u304c\u3002<\/p>\n<p>\u3088\u304f\u308f\u304b\u3093\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u52d5\u304d\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3088\u3046\u3068 sudo \u3057\u306a\u3044\u3067 easy_install \u3092\u52d5\u304b\u3057\u3066\u307f\u305f\u3093\u3067\u3059!<\/p>\n<pre>goro@flora:~$ easy_install pip error: can't create or remove files in install directory\r\nThe following error occurred while trying to add or remove files in the\r\ninstallation directory:\r\n    [Errno 13] Permission denied: '\/Library\/Python\/2.7\/site-packages\/test-easy-install-73424.write-test'\r\nThe installation directory you specified (via --install-dir, --prefix, or\r\nthe distutils default setting) was:\r\n    <span style=\"color: #ff0000;\">\/Library\/Python\/2.7\/site-packages\/<\/span>\r\n\u4ee5\u4e0b\u7565<\/pre>\n<p>\u3042\u308c? Package \u306f \/Library\/Python \u306e\u4e0b\u306b\u5165\u308b\u306e? \u3060\u3063\u305f\u3089 1. \u306e\u30eb\u30fc\u30eb\u306b\u9055\u53cd\u3059\u308b\u3053\u3068\u306f\u306a\u3044? \u3068\u3044\u3046\u3053\u3067\u3061\u3083\u3093\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307f\u307e\u3057\u305f<\/p>\n<pre>goro@flora:~$ sudo easy_install pip\r\nSearching for pip\r\nReading http:\/\/pypi.python.org\/simple\/pip\/\r\nReading http:\/\/www.pip-installer.org\r\nReading http:\/\/pip.openplans.org\r\nBest match: pip 1.2.1\r\nDownloading http:\/\/pypi.python.org\/packages\/source\/p\/pip\/pip-1.2.1.tar.gz#md5=db8a6d8a4564d3dc7f337ebed67b1a85\r\nProcessing pip-1.2.1.tar.gz\r\nRunning pip-1.2.1\/setup.py -q bdist_egg --dist-dir \/tmp\/easy_install-Pp47TA\/pip-1.2.1\/egg-dist-tmp-jQZun5\r\nwarning: no files found matching '*.html' under directory 'docs'\r\nwarning: no previously-included files matching '*.txt' found under directory 'docs\/_build'\r\nno previously-included directories found matching 'docs\/_build\/_sources'\r\nAdding pip 1.2.1 to easy-install.pth file\r\nInstalling pip script to <span style=\"color: #ff0000;\">\/usr\/local\/bin<\/span>\r\nInstalling pip-2.7 script to <span style=\"color: #ff0000;\">\/usr\/local\/bin<\/span>\r\n\r\nInstalled <span style=\"color: #ff0000;\">\/Library\/Python\/2.7\/site-packages\/pip-1.2.1-py2.7.egg<\/span>\r\nProcessing dependencies for pip\r\nFinished processing dependencies for pip<\/pre>\n<p>\u2026\u3084\u3063\u305f\u3041!<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u7121\u99c4\u306b\u6642\u9593\u3092\u4f7f\u3063\u305f\u6c17\u304c\u3057\u307e\u3059\u304c\u3001 OS X \u6a19\u6e96\u306e python \u3067 easy_install \u3092\u4f7f\u3063\u3066\u3082\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306f \/Library\/Python\/2.7\/site-packages \u3060\u3063\u305f\u308a \/usr\/local\/bin \u3060\u3063\u305f\u308a\u3059\u308b\u306e\u3067 \/System\/Library \u306f\u6975\u529b\u6c5a\u67d3\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3067\u304d\u3066\u308b\u307f\u305f\u3044\u3067\u3059\u3002<br \/>\n\u3057\u304b\u3057\u3001\u3060\u3063\u305f\u3089 python \u95a2\u9023\u306f pkgsrc \u3058\u3083\u306a\u304f\u3063\u3066 pip \u3067\u7ba1\u7406\u3057\u305f\u307b\u3046\u304c\u4fbf\u5229\u306a\u306e\u304b\u3082\u3060\u306a\u3041\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6065\u305a\u304b\u3057\u306a\u304c\u3089\u4eca\u307e\u3067\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[31,77,62,65],"class_list":["post-1967","post","type-post","status-publish","format-standard","hentry","category-mac","tag-bazzer","tag-mac","tag-os-x-server","tag-python"],"_links":{"self":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/comments?post=1967"}],"version-history":[{"count":10,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1967\/revisions"}],"predecessor-version":[{"id":1989,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/posts\/1967\/revisions\/1989"}],"wp:attachment":[{"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/media?parent=1967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/categories?post=1967"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/borg4.vdomains.jp\/~goro\/diary\/wp-json\/wp\/v2\/tags?post=1967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}