{"id":33366,"date":"2020-03-16T18:07:37","date_gmt":"2020-03-16T12:37:37","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=33366"},"modified":"2020-03-16T18:07:37","modified_gmt":"2020-03-16T12:37:37","slug":"how-to-install-python-pip-on-windows-mac-and-linux","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/how-to-install-python-pip-on-windows-mac-and-linux\/","title":{"rendered":"How to Install Python PIP on Windows, Mac, and Linux"},"content":{"rendered":"<p>Just like any serious programming language , Python supports third-party libraries and frameworks that you simply can install to avoid reinventing the wheel with every new project. If you would like to use them you\u2019ll find these Python libraries on a central repository called the Python Package Index (PyPI).<\/p>\n<p>Downloading, installing, and managing these packages by hand are often frustrating and time-consuming. this is often why many Python developers believe a special tool called PIP for Python (or Python PIP) to form everything much easier and faster.<\/p>\n<h3 id=\"what-is-pip-for-python\">What Is PIP for Python?<\/h3>\n<p>PIP is an acronym that stands for <strong>\u201cPIP Installs Packages\u201d or \u201cPreferred Installer Program\u201d<\/strong>. It\u2019s a command-line utility that permits you to put in , reinstall, or uninstall PyPI packages with an easy and easy command: pip.<\/p>\n<p>If you\u2019ve ever done any command-line work on Windows (with the Command Prompt) or Mac or Linux (with the Terminal and Bash), then you\u2019ll skip right down to the installation instructions for your particular OS .<\/p>\n<h3 id=\"is-pip-installed-with-python\">\u00a0Is PIP Installed With Python?<\/h3>\n<p>If you\u2019re using Python 2.7.9 (or greater) or Python 3.4 (or greater), then PIP comes installed with Python by default. If you\u2019re using an older version of Python, you\u2019ll got to use the installation steps below. Otherwise, skip to rock bottom to find out the way to start using PIP.<\/p>\n<p>If you\u2019re running Python during a virtual environment created with either virtualenv or pyvenv, then PIP are going to be available no matter the Python version.<\/p>\n<h3 id=\"is-python-correctly-installed\">Is Python Correctly Installed?<\/h3>\n<p>You have to form sure Python is correctly installed on your system. On Windows, open up the prompt using <strong>Windows key + X<\/strong> and selecting prompt . On Mac, open the Terminal using Command + Space and checking out terminal. On Linux, open the Terminal using <strong>Ctrl + Alt + T<\/strong>. Linux shortcuts may vary by distribution.<\/p>\n<p><strong>Then type:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpython%20\u2013version\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>On Linux, Python 3.x users may need to use:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpython3%20\u2013version\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>If you get a version number (e.g. \u201cPython 2.7.5\u201d) then Python is prepared to travel .<\/p>\n<p>If you get a \u201cPython isn\u2019t defined\u201d message, then you\u2019ll need to first install Python properly. That\u2019s beyond the scope of this text . The Python site has some detailed instructions for installation.<\/p>\n<h3 id=\"how-to-install-pip-on-windows\">How to Install PIP on Windows<\/h3>\n<p>These instructions should work on Windows 7, Windows 8.1, and Windows 10:<\/p>\n<p>Download the get-pip.py installer script. If you\u2019re on Python 3.2, you\u2019ll need this version of get-pip.py instead. Either way, right-click on the link and choose Save As\u2026 and reserve it to any safe location, like your Downloads folder.<\/p>\n<p>Open the prompt and navigate to the get-pip.py file.<\/p>\n<p>Run the subsequent command: python get-pip.py<\/p>\n<h3 id=\"how-to-install-pip-on-mac\">How to Install PIP on Mac<\/h3>\n<p>Modern Mac systems accompany Python and PIP already installed. However, this version of Python tends to be outdated and not the simplest choice for serious Python development. It\u2019s highly recommended that you simply install a more current version of Python and PIP.<\/p>\n<p>If you would like to use the native system Python installation but don\u2019t have PIP available, you\u2019ll install PIP with the subsequent command in Terminal:<\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20easy_install%20pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<h3 id=\"how-to-install-pip-on-linux\">How to Install PIP on Linux<\/h3>\n<p>If your Linux distribution came with Python already installed, you should be able to install PIP using your system\u2019s package manager. This is preferable since system-installed versions of Python do not play nicely with the get-pip.py script used on Windows and Mac.<\/p>\n<p><strong>Advanced Package Tool (Python 2.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20apt-get%20install%20python-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Advanced Package Tool (Python 3.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20apt-get%20install%20python3-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>pacman Package Manager (Python 2.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20pacman%20-S%20python2-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>pacman Package Manager (Python 3.x)<\/strong><\/p>\n<div id=\"snhb-in_content-5-0\" class=\"aligncenter mobile-only\">\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20pacman%20-S%20python-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>\u00a0<\/p>\n<\/div>\n<p><strong>Yum Package Manager (Python 2.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20yum%20upgrade%20python-setuptools%20sudo%20yum%20install%20python-pip%20python-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Yum Package Manager (Python 3.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20yum%20install%20python3%20python3-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Dandified Yum (Python 2.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20dnf%20upgrade%20python-setuptools%20sudo%20dnf%20install%20python-pip%20python-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Dandified Yum (Python 3.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20dnf%20install%20python3%20python3-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Zypper Package Manager (Python 2.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20zypper%20install%20python-pip%20python-setuptools%20python-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>Zypper Package Manager (Python 3.x)<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20zypper%20install%20python3-pip%20python3-setuptools%20python3-wheel\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<h3 id=\"how-to-install-pip-on-raspberry-pi\">How to Install PIP on Raspberry Pi<\/h3>\n<p>As a Raspberry Pi user, you\u2019re probably running Raspbian since it\u2019s the official OS designated and provided by the Raspberry Pi Foundation. You\u2019re liberal to install another OS , like Ubuntu. If that\u2019s the case you ought to check out the Linux instructions.<\/p>\n<p>Starting with Raspbian Jessie, PIP comes installed by default. It\u2019s one among the large reasons to upgrade to Raspbian Jessie rather than sticking with Raspbian Wheezy or Raspbian Jessie Lite. However, if you\u2019re on an older version of Raspbian, you\u2019ll still install PIP.<\/p>\n<p><strong>On Python 2.x:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20apt-get%20install%20python-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>On Python 3.x:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dsudo%20apt-get%20install%20python3-pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>With Raspbian, Python 2.x users should use\u00a0<strong>pip<\/strong>\u00a0while Python 3.x users should use\u00a0<strong>pip3<\/strong>\u00a0when issuing PIP commands.<\/p>\n<h3 id=\"how-to-upgrade-pip-for-python\">How to Upgrade PIP for Python<\/h3>\n<p>While PIP itself doesn\u2019t update fairly often , it\u2019s still important to remain on top of latest versions because there could also be important fixes to bugs, compatibility, and security holes. Fortunately, upgrading PIP is quick and straightforward .<\/p>\n<p><strong>On Windows:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpython%20-m%20pip%20install%20-U%20pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>On Mac, Linux, or Raspberry Pi:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20install%20-U%20pip\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<h2 id=\"how-to-manage-python-packages-with-pip\">How to Manage Python Packages With PIP<\/h2>\n<p><strong>Once PIP is ready, you can start installing packages from PyPI:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20install%20package-name\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To install a specific version of a package instead of the latest version:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20install%20package-name%3D%3D1.0.0\u2033 message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To search PyPI for a particular package:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20search%20%22query%22\u2033 message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To see details about an installed package:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20show%20package-name\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To list all installed packages:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20list\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To list all outdated packages:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20list%20\u2013outdated\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p><strong>To upgrade an outdated package:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20install%20package-name%20\u2013upgrade\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>Note that older versions of a package are automatically removed by PIP when upgrading to a newer version of that package.<\/p>\n<p><strong>To completely reinstall a package:<\/strong><\/p>\n<pre class=\" language-bash\"><code class=\" language-bash\"><\/code><\/pre>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20install%20package-name%20\u2013upgrade%20\u2013force-reinstall\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<pre class=\" language-bash\"><code class=\" language-bash\"><\/code><\/pre>\n<p><strong>To completely get rid of a package:<\/strong><\/p>\n[pastacode lang=\u201dbash\u201d manual=\u201dpip%20uninstall%20package-name\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just like any serious programming language , Python supports third-party libraries and frameworks that you simply can install to avoid reinventing the wheel with every new project. If you would like to use them you\u2019ll find these Python libraries on a central repository called the Python Package Index (PyPI). Downloading, installing, and managing these packages [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":33388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4148],"tags":[86866,86869,86868,86867,86865],"class_list":["post-33366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-pip","tag-pip-for-python","tag-pip-install","tag-pip-on-mac","tag-pyhton"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/33366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=33366"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/33366\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/33388"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=33366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=33366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=33366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}