diff --git a/docs/content/python/concepts/pip/command-line-use.md b/docs/content/python/concepts/pip/command-line-use.md new file mode 100644 index 00000000000..2887d42a8c1 --- /dev/null +++ b/docs/content/python/concepts/pip/command-line-use.md @@ -0,0 +1,56 @@ +--- +Title: 'Command-Line Use of pip' +Description: 'The pip command is used in the terminal to manage Python packages.' +Subjects: + - 'Code Foundation' + - 'Developer Tools' +Tags: + - 'pip' + - 'packages' + - 'terminal' + - 'command line' +Url: '/docs/python/concepts/pip/command-line-use' +--- + +## Introduction + +**pip** (pip installs packages) is a command-line tool used to install and manage Python packages from the Python Package Index (PyPI). It allows developers to easily add third-party libraries and modules to their Python projects. + +## Syntax + +``` +pip install +pip uninstall +pip list +pip show +pip search +``` + +## Example + +To install the popular `requests` library, use the following command: + +```bash +pip install requests +``` + +This command will download and install the `requests` package from PyPI. Once installed, you can import and use it in your Python code: + +```python +import requests + +response = requests.get('https://api.example.com/data') +print(response.json()) +``` + +To see all installed packages, use: + +```bash +pip list +``` + +To uninstall a package, use: + +```bash +pip uninstall requests +```