How To Install python-yowsup on Ubuntu 18.04

In this tutorial we learn how to install python-yowsup on Ubuntu 18.04. python-yowsup is library to implement a WhatsApp client

Introduction

In this tutorial we learn how to install python-yowsup on Ubuntu 18.04.

What is python-yowsup

python-yowsup is:

WhatsApp Messenger is a cross-platform mobile messaging app which allows you to exchange messages, via Internet, without having to pay for SMS, using a mobile phone.

In addition to basic messaging, WhatsApp users can create groups, send each other unlimited images, video and audio media messages.

Yowsup is a cross platform Python library that enable to do all the previous in your own app. Yowsup allows you to login and use the WhatsApp service, providing all capabilities of an official WhatsApp client, allowing to create a full-fledged custom WhatsApp client.

python-yowsup has these features: - Registration. - Text send/receive. - Encryption of messages. - Media send/receive (images, videos, audio, location, contact cards). - Groups(create, leave, join, update picture, updating subject). - Fetch user profile picture. - Fetch user status. - Set profile picture. - Set group icon. - Set status and others. . The package yowsup-cli is a good example of the python-yowsup implementation.

There are three methods to install python-yowsup on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python-yowsup Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-yowsup using apt-get by running the following command:

sudo apt-get -y install python-yowsup

Install python-yowsup Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-yowsup using apt by running the following command:

sudo apt -y install python-yowsup

Install python-yowsup Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install python-yowsup using aptitude by running the following command:

sudo aptitude -y install python-yowsup

How To Uninstall python-yowsup on Ubuntu 18.04

To uninstall only the python-yowsup package we can use the following command:

sudo apt-get remove python-yowsup

Uninstall python-yowsup And Its Dependencies

To uninstall python-yowsup and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove python-yowsup

Remove python-yowsup Configurations and Data

To remove python-yowsup configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge python-yowsup

Remove python-yowsup configuration, data, and all of its dependencies

We can use the following command to remove python-yowsup configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-yowsup

References

Summary

In this tutorial we learn how to install python-yowsup package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.