{"id":1675,"date":"2018-10-24T13:00:23","date_gmt":"2018-10-24T12:00:23","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1675"},"modified":"2018-10-28T00:37:28","modified_gmt":"2018-10-27T23:37:28","slug":"how-to-install-python-pip-on-ubuntu-18-04-server","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1675\/how-to-install-python-pip-on-ubuntu-18-04-server\/","title":{"rendered":"How to install Python Pip on Ubuntu 18.04 Server"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1677\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1675\/how-to-install-python-pip-on-ubuntu-18-04-server\/installing_pip_ubuntu_server\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"installing_pip_ubuntu_server\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?fit=678%2C254&amp;ssl=1\" class=\"aligncenter size-full wp-image-1677\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?resize=678%2C254\" alt=\"\" width=\"678\" height=\"254\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/p>\n<p>This post describes how you can install Python Pip on ubuntu 18.04.<\/p>\n<p><!--more--><\/p>\n<h2>Why apt doesn&#8217;t work immediately<\/h2>\n<p>By default the server edition of Ubuntu only includes the main repository for the Ubuntu software. This is for various performance and security reasons but means that there are a number of packages that don&#8217;t\u00a0fit into this realm.<\/p>\n<p>To be able to install pip you will need to configure an additional set of repositories to download it.<\/p>\n<h2>Configuring the Universe repositories<\/h2>\n<p>As an administrator\u00a0or by using sudo you will need to edit <code>\/etc\/apt\/sources.list<\/code>. This will allow for the list of apt sources to be configured. For example you can run the below command to edit the file.<\/p>\n<pre class=\"lang-py prettyprint prettyprinted\"><code><span class=\"pln\">sudo nano <\/span><span class=\"pun\">\/<\/span><span class=\"pln\">etc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">apt<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">sources<\/span><span class=\"pun\">.<\/span><span class=\"pln\">list<\/span><\/code><\/pre>\n<p>If this is a clean install of Ubuntu 18.04 server this file will likely contain the following lines.<\/p>\n<pre class=\"lang-py prettyprint prettyprinted\"><code><span class=\"pln\">deb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic main\r\ndeb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic<\/span><span class=\"pun\">-<\/span><span class=\"pln\">security main\r\ndeb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic<\/span><span class=\"pun\">-<\/span><span class=\"pln\">updates main<\/span><\/code><\/pre>\n<p>To add the universe repositories you need to add <code>universe<\/code> to the end of each line. Your modified file should look like the following.<\/p>\n<pre class=\"lang-py prettyprint prettyprinted\"><code><span class=\"pln\">deb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic main universe\r\ndeb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic<\/span><span class=\"pun\">-<\/span><span class=\"pln\">security main universe \r\ndeb http<\/span><span class=\"pun\">:\/\/<\/span><span class=\"pln\">archive<\/span><span class=\"pun\">.<\/span><span class=\"pln\">ubuntu<\/span><span class=\"pun\">.<\/span><span class=\"pln\">com<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">ubuntu bionic<\/span><span class=\"pun\">-<\/span><span class=\"pln\">updates main universe<\/span><\/code><\/pre>\n<p>Once this has been done, save the file using <code>Ctrl-O<\/code> if you are using Nano.<\/p>\n<p>Now you can update apt, and then install python-pip.<\/p>\n<pre>sudo apt update\r\nsudo apt install python-pip<\/pre>\n<p>In addition to pip, this will allow installation of many other packages.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post describes how you can install Python Pip on ubuntu 18.04.<\/p>\n","protected":false},"author":1,"featured_media":1697,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Lately I have ben testing #Ubuntu 18.04 and have written how to install Python Pip on Ubuntu 18.04 Server","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[39,184,147,315,316],"class_list":["post-1675","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-linux","tag-python","tag-ubuntu","tag-ubuntu-18-04","tag-ubuntu-18-04-server"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/installing_pip_ubuntu_server-1.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-r1","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1698,"url":"https:\/\/chewett.co.uk\/blog\/1698\/enabling-ssh-on-ubuntu-18-04\/","url_meta":{"origin":1675,"position":0},"title":"Enabling SSH on Ubuntu 18.04","author":"Chewett","date":"November 14, 2018","format":false,"excerpt":"By default Ubuntu 18.04 doesn't enable SSH, this post describes the steps you need to set up SSH. Enabling SSH on Ubuntu 18.04 Since many people will not require a SSH daemon on their computer this is not enabled by default. This means if you want to SSH into your\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/enabling_ssh_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/enabling_ssh_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/enabling_ssh_ubuntu.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/enabling_ssh_ubuntu.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1684,"url":"https:\/\/chewett.co.uk\/blog\/1684\/upgrading-ubuntu-16-04-to-18-04\/","url_meta":{"origin":1675,"position":1},"title":"Upgrading Ubuntu 16.04 to 18.04","author":"Chewett","date":"December 1, 2018","format":false,"excerpt":"This blog post talks about how you can upgrade from Ubuntu 16.04 to Ubuntu 18.04. Preparing to upgrade your Ubuntu distribution Before performing any large upgrade to any computer system you should first back up any and all important work. This is because there is always a chance (no matter\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/upgrading_to_1804_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/upgrading_to_1804_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/upgrading_to_1804_ubuntu.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/upgrading_to_1804_ubuntu.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1680,"url":"https:\/\/chewett.co.uk\/blog\/1680\/how-to-set-the-timezone-on-ubuntu-18-04-server\/","url_meta":{"origin":1675,"position":2},"title":"How to set the Timezone on Ubuntu 18.04 Server","author":"Chewett","date":"October 31, 2018","format":false,"excerpt":"Today I am writing about how you can change the timezone on Ubuntu 18.04 Server. Changing the Timezone By default, the timezone will be configured when the server is installed. This will mean for the most part people will not need to change the timezone of the server. However if\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/changing_ubuntu_timezone.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/changing_ubuntu_timezone.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/changing_ubuntu_timezone.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/changing_ubuntu_timezone.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":831,"url":"https:\/\/chewett.co.uk\/blog\/831\/enabling-ssh-ubuntu-16-04\/","url_meta":{"origin":1675,"position":3},"title":"Enabling SSH on Ubuntu 16.04","author":"Chewett","date":"November 8, 2017","format":false,"excerpt":"By default you are not able to SSH into an Ubuntu 16.04\u00a0 machine and this blog post describes the steps needed to install SSH server. Installing OpenSSH Server To enable logging in from another computer via SSH you need to install a SSH\u00a0server. To do this you\u00a0can run the following\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/11\/enable_ssh_on_ubuntu.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2541,"url":"https:\/\/chewett.co.uk\/blog\/2541\/install-virtualbox-guest-additions-on-ubuntu-20-04\/","url_meta":{"origin":1675,"position":4},"title":"Install Virtualbox Guest Additions on Ubuntu 20.04","author":"Chewett","date":"August 29, 2020","format":false,"excerpt":"This post describes how you can install Virtualbox Guest Additions on Ubuntu 20.04. Installing Virtualbox Guest Additions on Ubuntu 20.04 To install Virtualbox Guest Additions on Ubuntu 20.04 you will want to enable the multiverse repository. You can do this by running the following command. sudo add-apt-repository multiverse Once this\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/virtualbox_guest_additions_ubuntu_2004_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/virtualbox_guest_additions_ubuntu_2004_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/virtualbox_guest_additions_ubuntu_2004_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/virtualbox_guest_additions_ubuntu_2004_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/virtualbox_guest_additions_ubuntu_2004_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":572,"url":"https:\/\/chewett.co.uk\/blog\/572\/installing-ubuntu-linux-tools-windows\/","url_meta":{"origin":1675,"position":5},"title":"Installing Ubuntu Linux tools for Windows","author":"Chewett","date":"August 23, 2017","format":false,"excerpt":"I am a big fan of Linux and today want to share how you can install the Windows Subsystem for Linux (WSL) on Windows 10. This new feature available in Windows 10 lets you install a Linux bash shell and run various linux tools on Windows. Here I describe how\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/windows_subsystem_for_linx.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1675"}],"version-history":[{"count":2,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions"}],"predecessor-version":[{"id":1679,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1675\/revisions\/1679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1697"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}