{"id":90,"date":"2020-03-22T23:09:00","date_gmt":"2020-03-23T06:09:00","guid":{"rendered":"http:\/\/junsun.net\/wordpress\/?p=90"},"modified":"2020-04-22T14:14:30","modified_gmt":"2020-04-22T21:14:30","slug":"install-numpy-and-matplotlib-on-chromebook-linuxbeta","status":"publish","type":"post","link":"https:\/\/junsun.net\/wordpress\/2020\/03\/install-numpy-and-matplotlib-on-chromebook-linuxbeta\/","title":{"rendered":"Install NumPy and Matplotlib on Chromebook\/Linux(Beta)"},"content":{"rendered":"\n<p>Linux(Beta) on Chromebook is really cool.  You can easily and officially turn it on by following a<a href=\"https:\/\/support.google.com\/chromebook\/answer\/9145439?hl=en\"> very simple step<\/a>.  Apparently there are also ways to <a href=\"https:\/\/beebom.com\/enable-microphone-gpu-acceleration-linux-chromebook\/\">enable audio capture and GPU acceleration<\/a> as well.<\/p>\n\n\n\n<p>I was playing with  Lenovo N23 Yoga , which is an AAarch64(ARM64) Chromebook powered by MTK8173 chipset.  It turned out to be an interesting experience.  Specifically I was able to do some simple Python development.<\/p>\n\n\n\n<h2>Step 1 &#8211; Enable Linux (beta)<\/h2>\n\n\n\n<p>Follow the instructions at <a href=\"https:\/\/support.google.com\/chromebook\/answer\/9145439?hl=en\">this page<\/a>.<\/p>\n\n\n\n<h2>Step 2 &#8211; Install debian packages<\/h2>\n\n\n\n<p>The Linux environment seems to be a container-type environment, running Debian Linux.  Python3 is already installed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt install python3-pip pkg-config libpng-dev libfreetype6-dev python3-tk<\/code><\/pre>\n\n\n\n<h2>Step 3 &#8211; Install PIP3 packages<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>pip3 install cython\npip3 install numpy\npip3 install matplotlib<\/code><\/pre>\n\n\n\n<h2>Step 4 &#8211; Try it out<\/h2>\n\n\n\n<p>Create the following Python file try.py:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import numpy\nimport matplotlib.pyplot as plt\n\nx = numpy.random.normal(5.0, 1.0, 100000)\n\nplt.hist(x, 100)\nplt.show()<\/code><\/pre>\n\n\n\n<p>Then run it by typing &#8220;python3 try.py&#8221;.  If everything goes well, you should see some picture like the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-22-at-11.08.03-PM.png\" alt=\"\" class=\"wp-image-92\" width=\"399\" height=\"340\" srcset=\"https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-22-at-11.08.03-PM.png 639w, https:\/\/junsun.net\/wordpress\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-22-at-11.08.03-PM-300x255.png 300w\" sizes=\"(max-width: 399px) 100vw, 399px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux(Beta) on Chromebook is really cool. You can easily and officially turn it on by following a very simple step. Apparently there are also ways to enable audio capture and GPU acceleration as well. I was playing with Lenovo N23 Yoga , which is an AAarch64(ARM64) Chromebook powered by MTK8173 chipset. It turned out to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/junsun.net\/wordpress\/2020\/03\/install-numpy-and-matplotlib-on-chromebook-linuxbeta\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install NumPy and Matplotlib on Chromebook\/Linux(Beta)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3],"tags":[31,35,34,32,33],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/90"}],"collection":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":5,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/posts\/90\/revisions\/123"}],"wp:attachment":[{"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/junsun.net\/wordpress\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}