{"id":169,"date":"2018-02-18T05:34:46","date_gmt":"2018-02-17T21:34:46","guid":{"rendered":"https:\/\/codestrian.com\/?p=169"},"modified":"2018-08-14T10:33:29","modified_gmt":"2018-08-14T02:33:29","slug":"setting-up-pyenv-on-ubuntu-16-04-the-missing-steps-from-the-other-guides","status":"publish","type":"post","link":"https:\/\/codestrian.com\/index.php\/2018\/02\/18\/setting-up-pyenv-on-ubuntu-16-04-the-missing-steps-from-the-other-guides\/","title":{"rendered":"Setting up pyenv on Ubuntu 16.04: The missing steps from the other guides"},"content":{"rendered":"<p>Installing pyenv is rather straight forward, one simply has to run the command below<\/p>\n<pre class=\"p1\">curl -L https:\/\/raw.githubusercontent.com\/pyenv\/pyenv-installer\/master\/bin\/pyenv-installer | bash<\/pre>\n<p>And when you tried to install a python version, you will probably see the follow error or something similar.<\/p>\n<pre class=\"p1\"><span class=\"s1\">$ pyenv install 3.6.3<\/span>\n<span class=\"s1\">Downloading Python-3.6.3.tar.xz...<\/span>\n<span class=\"s1\">-&gt; https:\/\/www.python.org\/ftp\/python\/3.6.3\/Python-3.6.3.tar.xz<\/span>\n<span class=\"s1\">Installing Python-3.6.3...<\/span>\n<span class=\"s1\">BUILD FAILED (Ubuntu 16.04 using python-build 20160602)<\/span>\n<span class=\"s1\">Inspect or clean up the working tree at \/tmp\/python-build.20180218111837.1471<\/span>\n<span class=\"s1\">Results logged to \/tmp\/python-build.20180218111837.1471.log<\/span>\n<span class=\"s1\">Last 10 log lines:<\/span>\n<span class=\"s1\">checking for --with-universal-archs... no<\/span>\n<span class=\"s1\">checking MACHDEP... linux<\/span>\n<span class=\"s1\">checking for --without-gcc... no<\/span>\n<span class=\"s1\">checking for --with-icc... no<\/span>\n<span class=\"s1\">checking for gcc... no<\/span>\n<span class=\"s1\">checking for cc... no<\/span>\n<span class=\"s1\">checking for cl.exe... no<\/span>\n<span class=\"s1\">configure: error: in `\/tmp\/python-build.20180218111837.1471\/Python-3.6.3':<\/span>\n<span class=\"s1\">configure: error: no acceptable C compiler found in $PATH<\/span>\n<span class=\"s1\">See `config.log' for more details<\/span><\/pre>\n<p>Yes, we have missing packages that needs to be installed before we can install any python. Run the following command before you install pyenv.<\/p>\n<pre class=\"p1\">sudo apt-get install build-essential git libreadline-dev zlib1g-dev libssl-dev libbz2-dev libsqlite3-dev<\/pre>\n<p>This will install all the packages that is needed to build and install the particular python version.<\/p>\n<p>Try installing again, and you will not see anymore errors.<\/p>\n<pre>$ pyenv install 3.6.4\n Downloading Python-3.6.4.tar.xz...\n -&gt; https:\/\/www.python.org\/ftp\/python\/3.6.4\/Python-3.6.4.tar.xz\n Installing Python-3.6.4...\n Installed Python-3.6.4 to \/home\/moxlotus\/.pyenv\/versions\/3.6.4<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Installing pyenv is rather straight forward, one simply has to run the command below curl -L https:\/\/raw.githubusercontent.com\/pyenv\/pyenv-installer\/master\/bin\/pyenv-installer | bash And when you tried to install a python version, you will probably see the follow error or something similar. $ pyenv install 3.6.3 Downloading Python-3.6.3.tar.xz&#8230; -&gt; https:\/\/www.python.org\/ftp\/python\/3.6.3\/Python-3.6.3.tar.xz Installing Python-3.6.3&#8230; BUILD FAILED [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[23,6],"_links":{"self":[{"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":294,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/posts\/169\/revisions\/294"}],"wp:attachment":[{"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codestrian.com\/index.php\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}