\r\nbrew install python3\r\n<\/pre>\n\u3092\u5b9f\u884c\u3057\u307e\u3059.<\/p>\n
Qt + PyQt \u306e\u5c0e\u5165<\/h2>\n
Homebrew \u3067 PyQt 4 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059. \u4f9d\u5b58\u95a2\u4fc2\u306b\u3088\u308a\u81ea\u52d5\u7684\u306b Qt \u7b49\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059.<\/p>\n
Python 2 \u306e\u307f\u3067\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f,<\/p>\n
\r\nbrew install pyqt\r\n<\/pre>\nPython 3 \u3067\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f,<\/p>\n
\r\nbrew install pyqt --without-python\r\n<\/pre>\nPython 2 \u3068 3 \u306e\u4e21\u65b9\u3067\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f,<\/p>\n
\r\nbrew install pyqt --with-python3\r\n<\/pre>\n\u3092\u5b9f\u884c\u3057\u307e\u3059.<\/p>\n
\u30c6\u30b9\u30c8<\/h2>\n
PyQt4 \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u304b\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059.<\/p>\n
\r\n$ python\r\nPython 2.7.8 (default, Oct 18 2014, 14:57:17) \r\n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin\r\nType "help", "copyright", "credits" or "license" for more information.\r\n>>> import PyQt4 \r\n>>> PyQt4\r\n<module 'PyQt4' from '\/usr\/local\/lib\/python2.7\/site-packages\/PyQt4\/__init__.py'>\r\n<\/pre>\n\r\n$ python3\r\nPython 3.4.2 (default, Oct 19 2014, 22:27:04) \r\n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin\r\nType "help", "copyright", "credits" or "license" for more information.\r\n>>> import PyQt4\r\n>>> PyQt4\r\n<module 'PyQt4' from '\/usr\/local\/lib\/python3.4\/site-packages\/PyQt4\/__init__.py'>\r\n<\/pre>\nvirtualenv \u304b\u3089 PyQt \u3092\u5229\u7528\u3059\u308b<\/h2>\n
\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u7b49\u3067 virtualenv \u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306f, \u901a\u5e38\u901a\u308a\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057, PyQt \u95a2\u4fc2\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u307f\u5225\u9014\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<\/p>\n
~\/venv \u306b\u4f5c\u6210\u3057\u305f\u4eee\u60f3\u74b0\u5883\u3067 OpenCV \u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u51fa\u6765\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f, \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059.<\/p>\n
Python 2 \u306e\u5834\u5408<\/p>\n
\r\ncd ~\/venv\/lib\/python2.7\/site-packages\r\nln -s \/usr\/local\/lib\/python2.7\/site-packages\/sip.so .\/\r\nln -s \/usr\/local\/lib\/python2.7\/site-packages\/sipconfig.py .\/\r\nln -s \/usr\/local\/lib\/python2.7\/site-packages\/sipdistutils.py .\/\r\nln -s \/usr\/local\/lib\/python2.7\/site-packages\/PyQt4 .\/\r\n<\/pre>\nPython 3 \u306e\u5834\u5408<\/p>\n
\r\ncd ~\/venv\/lib\/python3.4\/site-packages\r\nln -s \/usr\/local\/lib\/python3.4\/site-packages\/sip.so .\/\r\nln -s \/usr\/local\/lib\/python3.4\/site-packages\/sipconfig.py .\/\r\nln -s \/usr\/local\/lib\/python3.4\/site-packages\/sipdistutils.py .\/\r\nln -s \/usr\/local\/lib\/python3.4\/site-packages\/PyQt4 .\/\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Mac OS X \u3067 Python 2\/3 + Qt4 + PyQt4 \u306e\u958b\u767a\u74b0\u5883\u3092\u6574\u5099\u3059\u308b\u65b9\u6cd5\u3092\u307e\u3068\u3081\u307e\u3059. \u4eca\u56de\u3053\u306e\u65b9\u6cd5\u3067\u5c0e\u5165\u30c6\u30b9\u30c8\u3092\u884c\u306a\u3063\u305f\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059. OS X 10.10 Homebrew Pytho […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[21,15,62],"_links":{"self":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/569"}],"collection":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/comments?post=569"}],"version-history":[{"count":8,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":665,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/posts\/569\/revisions\/665"}],"wp:attachment":[{"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/media?parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/categories?post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ymyzk.com\/wp-json\/wp\/v2\/tags?post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}