Installing Packages with PIP

Posted by SusgUY446 on April 9, 2024

Hey, Today i will be teaching you how to install python packages using the pip package manager

What is PIP and what are python packages?

PIP is the default Package Manager for Python. Its installed by default. To check if you have it installed run pip --version


Result of pip --version

Python Packages are Python Scripts that you can install to use other peoples code without having to copy and paste it everytime.

How to install your first Python Package

Step 1

Open a new terminal.


Windows 11 Terminal

Step 2

Enter this command into your terminal (this is a example)


pip install gTTS


Step 3

Using the installed Package

Create a new python file. Put this on the first line

import gTTS

Now you can use gTTS (google text to speech)

Example:

import gtts
output = gtts.gTTS("hello world")
output.save("output.mp3")