Skip to content

Run pip command from command line/terminal

To install or update required packages in python, most people use pip.

But if you just open a console/terminal window and type in a pip command, you will get an error similar to this (this can vary depending on your OS):

'pip' is not recognized as an internal or external command, operable program or batch file.

Luckily, Python’s CLI has an option -m, which allows you to directly call a module (for example pip):

python -m pip install flask

(source)

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.