Python Tutorials
- Python
- How to install Python?
- PIP
- How to Run Python Program
- Python Identifiers,Statement, Indentation and Comments
- Variable
- Data type
- Decision Making
- Python Loops
- Break,Continue, Pass
- Functions
- Predefine Functions
- Lambda Functions
- Variable Scope
- List
- Tuple
- Python Sets
- Python Dictionary
- Python String
- String Formating
- Input/Output
- File Handling (Input / Output)
- Iterators
- Python Modules
- Python Date
- Python JSON
- Classes and Objects
- Constructor
- Polymorphism
- Encapsulation
- inheritance
- Class or Static Variables in Python
- class method vs static method
- Abstraction
- Exception Handling
- MySql Python
- MySql Create Database
- MySql CRUD
- Django
What is PIP in Python?
pip is a package manager for Python and is included by default with the Python installer. It helps to install and uninstall Python packages (such as Django!). For the rest of the installation, we’ll use pip to install Python packages from the command line.
PIP is a package manager for Python packages, or modules
Note: If you have Python version 3.4 or later, PIP is included by default.
What is a Package?
A package contains all the files you need for a module.
Modules are Python code libraries you can include in your project.
File name : index.py
Check if PIP is Installed Or Not
Navigate your command line to the location of Python's script directory, and type the following:
File name : index.py
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip --version
Download a Package
Open the command line interface and tell PIP to download the package you want. Navigate your command line to the location of Python's script directory, and type the following:
File name : index.py
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip install camelcase
Using a Package
Once the package is installed, it is ready to use. Import the "camelcase" package into your project.
File name : index.py
import camelcase
c = camelcase.CamelCase()
txt = "hello world"
print(c.hump(txt))
Find Packages
File name : index.py
Find more packages at https://pypi.org/.
List Packages
Use the list command to list all the packages installed on your system:
File name : index.py
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip list