{"id":2437,"date":"2019-02-15T11:11:12","date_gmt":"2019-02-15T02:11:12","guid":{"rendered":"http:\/\/research.itplants.com\/?p=2437"},"modified":"2019-02-15T16:51:33","modified_gmt":"2019-02-15T07:51:33","slug":"raspberry-pi%e3%81%aepyenv","status":"publish","type":"post","link":"https:\/\/research.itplants.com\/?p=2437","title":{"rendered":"Raspberry Pi\u306epyenv"},"content":{"rendered":"<p>Raspberry Pi\u306epyenv\u3067\u30cf\u30de\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u6ce8\u610f\u70b9\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002\u4e00\u756a\u3001\u56f0\u3063\u305f\u3053\u3068\u306f\u3001pyenv\u30673.5\u7cfb\u306epython\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001numpy\u304b\u3089\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3053\u3068\u3067\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u8abf\u3079\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u65b9\u6cd5\u3067\u89e3\u6c7a\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4>pyenv numpy\u30a8\u30e9\u30fc\u89e3\u6c7a\u65b9\u6cd5<\/h4>\n<h4>\u30a8\u30e9\u30fc\u5185\u5bb9<br \/>\nOriginal error was: libf77blas.so.3: cannot open shared object file: No such file or directory<\/h4>\n<h4>\u5bfe\u7b56<br \/>\nsudo apt install libatlas-base-dev<\/h4>\n<p>&nbsp;<\/p>\n<h4>\u30a8\u30e9\u30fc\u5185\u5bb9<br \/>\nmtrand.cpython-35m-arm-linux-gnueabihf.so: undefined symbol: PyFPE_jbuf<\/h4>\n<pre>\u5bfe\u7b56\r\nexport PYTHON_CONFIGURE_OPTS=\"--enable-ipv6\\\r\n--enable-unicode=ucs4\\\r\n<span class=\"pl-s\">--enable-shared\\\r\n<\/span>--with-dbmliborder=bdb:gdbm\\\r\n--with-system-expat\\\r\n--with-system-ffi\\\r\n--with-fpectl\"<\/pre>\n<p>\u4e0a\u8a18\u3092.profile\u306b\u8ffd\u8a18\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002&#8211;with-fpectl\u3000\u304c\u91cd\u8981\u307f\u305f\u3044\u3002pyenv\u3067\u5165\u308c\u305fpython\u3092uninstall\u3057\u3066\u304b\u3089python\u3092\u5165\u308c\u76f4\u3059\u3002<\/p>\n<p>$pyenv install -f 3.5.5<br \/>\n$pyenv virtualenv 3.5.5 p355<br \/>\n$source activate p355<br \/>\n$pip install numpy<br \/>\n$python<br \/>\n&gt; import numpy<\/p>\n<h4>pyenv\u3092\u89e3\u9664\u3059\u308b\u65b9\u6cd5<\/h4>\n<p>$pyenv global system<\/p>\n<p>$ python -V<br \/>\nPython 2.7.13<\/p>\n<p>$ python3 -V<br \/>\nPython 3.5.3<\/p>\n<h4>\u30d5\u30a9\u30eb\u30c0\u30fc\u6bce\u306b\u3001\u4f7f\u3046python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u81ea\u52d5\u5207\u308a\u66ff\u3048<\/h4>\n<p>$pyenv virtualenv 3.5.6 p356<\/p>\n<p>$mkdir python356<\/p>\n<p>$cd python356<\/p>\n<p>$pyenv local p356<\/p>\n<p>\u3053\u308c\u3067\u3001python356\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u5165\u308b\u305f\u3073\u306b\u3001python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5207\u308a\u66ff\u308f\u308b\u3002ROS\u3084\u30cb\u30e5\u30fc\u30e9\u30eb\u30cd\u30c3\u30c8\u3067\u306f\u3001python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4f9d\u5b58\u304c\u53b3\u3057\u3044\u306e\u3067\u3001pyenv\u306f\u4e0d\u53ef\u6b20\u3067\u3059\u306d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>opencv\u3092\u4f7f\u3046<\/h4>\n<p>\/usr\/local\/lib\/python3.5\/dist-packages\/cv2.so\u3092pyenv\u3067\u7ba1\u7406\u3057\u3066\u3044\u308blib\u306b\u8ffd\u52a0\u3059\u308b\u3068\u4f7f\u3048\u308b\u3002<\/p>\n<p>(python356) $ cp \/usr\/local\/lib\/python3.5\/dist-packages\/cv2.so \/home\/pi\/.pyenv\/versions\/python356\/lib\/python3.5\/site-packages\/<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Raspberry Pi\u306epyenv\u3067\u30cf\u30de\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001\u6ce8\u610f\u70b9\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002\u4e00\u756a\u3001\u56f0\u3063\u305f\u3053\u3068\u306f\u3001pyenv\u30673.5\u7cfb\u306epython\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001numpy\u304b\u3089\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3053\u3068\u3067\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u8abf\u3079\u3066\u3001\u4ee5\u4e0b&#8230;<\/p>\n<p><a class=\"more\" href=\"https:\/\/research.itplants.com\/?p=2437\"> Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2437"}],"collection":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2437"}],"version-history":[{"count":7,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2437\/revisions"}],"predecessor-version":[{"id":2444,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2437\/revisions\/2444"}],"wp:attachment":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}