
PIP is a package manager for Python packages, or modules if you like.
Note: If you have Python version 3.4 or later, PIP is included by default.
A package contains all the files you need for a module.
Modules are Python code libraries you can include in your project.
Navigate your command line to the location of Python's script directory, and type the following:
Check PIP version:
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip --versionIf you do not have PIP installed, you can download and install it from this page:https://pypi.org/project/pip/.
Downloading a package is very easy.
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:
Download a package named "camelcase":
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip install camelcaseOnce the package is installed, it is ready to use.
Import the "camelcase" package into your project.
Import and use "camelcase":
import camelcase
c = camelcase.CamelCase()
txt = "hello world"
print(c.hump(txt))Find more packages at https://pypi.org/.
Use the uninstall command to remove a package:
Uninstall the package named "camelcase":
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip uninstall camelcaseThe PIP Package Manager will ask you to confirm that you want to remove the camelcase package:
Uninstalling camelcase-0.2:
Would remove:
c:\users\your name\appdata\local\programs\python\python36-32\lib\site-packages\camelcase-0.2-py3.6.egg-info
c:\users\your name\appdata\local\programs\python\python36-32\lib\site-packages\camelcase\*
Proceed (y/n)?Press y and the package will be removed.
Use the list command to list all the packages installed on your system:
List installed packages:
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip listResult:
Package Version
-----------------------
camelcase 0.2
mysql-connector 2.1.6
pip 18.1
pymongo 3.6.1
setuptools 39.0.1