# How to install PyQuery package on Ubuntu 20.04?

{% embed url="<https://youtu.be/aVkCGwtmIjQ>" %}

### **Overview**&#x20;

Using a syntax similar to jQuery, the Python library PyQuery enables you to choose and modify HTML elements. It is based on the lxml HTML parser and offers a variety of features that make working with HTML pages simple.&#x20;

### **Prerequisites**&#x20;

There are certain prerequisites that need to be met before you begin. &#x20;

* Ubuntu 20.04 LTS configured on your system.&#x20;
* Non-root sudo user privileges.&#x20;

### **Get Started**&#x20;

**Step 1:** Update the ubuntu package index.

```
sudo apt update
```

**Step 2:** Install the pip package manager.&#x20;

```
sudo apt install python3-pip 
```

\
&#x20;**Step 3:** Use pip to install PyQuery.&#x20;

<figure><img src="https://customer.acecloudhosting.com/index.php?rp=/images/kb/1670_pip3.png" alt=""><figcaption></figcaption></figure>

```
pip3 install pyquery 
```

\
**Step 4:** To verify that PyQuery has been installed correctly, you can use two methods:

<figure><img src="https://customer.acecloudhosting.com/index.php?rp=/images/kb/1671_pip4.png" alt=""><figcaption></figcaption></figure>

**a. Importing PyQuery Module**

```
python3 -c "import pyquery"
```

b. **Using Pip**

```
python3 –m show pyquery 
```

<figure><img src="https://customer.acecloudhosting.com/index.php?rp=/images/kb/1672_pip-5.png" alt=""><figcaption></figcaption></figure>

### **Conclusion**&#x20;

You discovered how to set up the PyQuery package on Ubuntu 20.04 in this article. PyQuery can be used to choose and experiment with HTML components. It is powerful, user-friendly, and well-documented.
