How to Install Pip on Ubuntu 16.04 LTS

Arguably one of the easiest tools to use for installing and managing Python packages, Pip has earned is notoriety by the number of applications utilizing this tool. Fancied for its capabilities in handling binary packages over the easy_installed packaged manager, pip enables 3rd party package installations. Though Python does sometimes come with pip as a default, this tutorial will show how to install, check its version as well as some basic commands for using pip on Ubuntu 16.04.

 

Pre-Flight Check

  • These instructions are intended for an Ubuntu 16.04 LTS server, and we are logged in as root.
  • If you are using a different operating system, check out our other pip installation guides.

Step 1: 

Ensure that all packages are up-to-date. After running the command below, you’ll get an output of any packages getting their update.

apt-get update

Step 2:

Install pip with cURL and Python. Downloading using the cURL command ensures the latest version of pip.curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

Step 3: 

Verifying the installation of pip:

pip --version

Output:
pip --version
pip 18.0 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

Installing Libraries

Pip can install 3rd party packages like Django, Tensorflow, Numpy, Pandas and many more with the following command.

pip install <library_name>

 

Searching for Libraries

You can also search for other libraries in Python’s repository via command line. For our example let’s look for Django packages. The search command shows us an extensive list similar to the one below.

pip search django
django-bagou (0.1.0) - Django Websocket for Django
django-maro (0.0.2) - `django-maro` is utility for django.
django-hooked (0.1.7) - WebHooks for Django and Django Rest Framework.
django-ide (0.0.5) - A Django app to develop Django apps
django-mailwhimp (0.1) - django-mailwhimp integrates mailchimp into Django
django-six (1.0.4) - Django-six —— Django Compatibility Library
django-umanage (1.1.1) - Django user management app for django
django-nadmin (0.1.0) - django nadmin support django version 1.8 based on django-xadmin
diy-django (1.3.1) - diy-django

 

Uninstalling a Library

If you don’t need the library and your scripts use them you can uninstall easily with this command:

pip uninstall

 

Installing Python Resources

Many times Python packages have a requirements.txt file, if you see this file, you can run this command to install all libraries in that package

pip install -r requirements.txt

 

Using Conda for Alternate Python Installations

Let’s be honest: Most of the time, the Python version included with a Linux distro isn’t the newest. For example, at the time of this writing, the version of Python 2 included with our CentOS 7 Storm images is 2.7.5, and Python 3 isn’t even available out of the box. For reference (again, at the time of this writing), the latest versions are 2.7.14 and 3.6.4 respectively.

Chances are that if you’re reading this article, you already have a reason to run a different version than what’s included (especially if 3.x is needed). However, if you stumbled on this article by chance, various reasons might include new features, a software package or library that only works up to a certain version, etc.

Continue reading “Using Conda for Alternate Python Installations”

Using Passenger with cPanel on CentOS 7

Phusion Passenger is a web application server that can run Ruby, Node.js, and Python applications on your webserver. It integrates with both Apache and Nginx to serve content to your visitors. Historically, this application was difficult to integrate with cPanel servers, which would combine the power of Ruby applications with the ease of management that cPanel provides, but recent advancements make setting up your Passenger module very simple. This easy walkthrough will show you how to add Passenger, Apache mod_passenger, and the supporting Ruby installation to cPanel. Continue reading “Using Passenger with cPanel on CentOS 7”

How to Install or Upgrade Django Using Pip

Django is a Python web framework; it’s free, open source, and often used with complex, database-driven websites.

Pre-Flight Check
  • These instructions are intended specifically for installing Django, a Python web framework.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “How to Install or Upgrade Django Using Pip”

How to Install an Object Storage Python Library (boto)

boto is a python library that enables a user to interact with Storm Object Storage, as well as other web services by Amazon, Google, and OpenStack.

Pre-Flight Check
  • These instructions are intended specifically for installing boto, a python library for managing Storm Object Stores.
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “How to Install an Object Storage Python Library (boto)”

How to Install Pip on Fedora 21

Pip is a tool for installing and managing Python packages.

Python is a programming language. It is quite popular and has a design philosophy that emphasizes code readability. It is widely considered to be a very easy programming language to learn and master because of its focus on readability. Python is open source, and will run a multitude of platforms including, but not limited to: Various Linux/UNIX distributions (CentOS, Ubuntu, Fedora, Debian, etc.), Microsoft Windows, and Mac OS X.

Pre-Flight Check
  • These instructions are intended specifically for installing Pip, a tool for installing and managing Python packages.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as root.

Continue reading “How to Install Pip on Fedora 21”

How to Install Pip on Fedora 20

Pip is a tool for installing and managing Python packages.

Python is a programming language. It is quite popular and has a design philosophy that emphasizes code readability. It is widely considered to be a very easy programming language to learn and master because of its focus on readability. Python is open source, and will run a a multitude of platforms including, but not limited to: Various Linux/UNIX distributions (CentOS, Ubuntu, Fedora, Debian, etc.), Microsoft Windows, and Mac OS X.

Pre-Flight Check
  • These instructions are intended specifically for installing Pip, a tool for installing and managing Python packages.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.

Continue reading “How to Install Pip on Fedora 20”

How to Install Pip on Ubuntu 12.04 LTS

Pip is a tool for installing and managing Python packages.

Python is a programming language. It is quite popular and has a design philosophy that emphasizes code readability. It is widely considered to be a very easy programming language to learn and master because of its focus on readability. Python is open source, and will run a multitude of platforms including, but not limited to: Various Linux/UNIX distributions (CentOS, Ubuntu, Fedora, Debian, etc.), Microsoft Windows, and Mac OS X.

Pre-Flight Check
  • These instructions are intended specifically for installing Pip, a tool for installing and managing Python packages.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 12.04 LTS server, and I’ll be logged in as root.

Continue reading “How to Install Pip on Ubuntu 12.04 LTS”

How to Install Pip on Ubuntu 14.04 LTS

Pip is a tool for installing and managing Python packages. Python is a programming language that is quite popular and has a design philosophy that emphasizes code readability. It is widely considered to be a straightforward  programming language to learn and master because of its focus on readability. Python is open source, and will run a multitude of platforms including, but not limited to: Various Linux/UNIX distributions (CentOS, Ubuntu, Fedora, Debian, etc.), Microsoft Windows, and Mac OS X.

Pre-Flight Check
  • These instructions are intended specifically for installing Pip, a tool for installing and managing Python packages.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as root.

Continue reading “How to Install Pip on Ubuntu 14.04 LTS”

How to Install an Object Storage Command Line Interface (awscli)

awscli is a python module that enables a user to interact with Storm Object Storage via the command line.

Storm Object Storage 101: Command Line
I. How to Install an Object Storage Command Line Interface (awscli)
II. How to Configure awscli for Use with Storm Object Storage
III. How to Use Basic awscli Commands with Storm Object Storage
Pre-Flight Check
  • These instructions are intended specifically for installing awscli, a tool for managing Storm Object Storage from the command line .
  • I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “How to Install an Object Storage Command Line Interface (awscli)”