close

How do I run pip on python for windows?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How do I run pip on python for windows in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How do I run pip on python for windows?

  1. How do I run pip on python for windows?

    I have a Mac, but luckily this should work the same way:
    pip is a command-line thing. You don't run it in python.
    For example, on my Mac, I just say:
    $pip install somelib
    pretty easy!

  2. run pip on python for windows

    I have a Mac, but luckily this should work the same way:
    pip is a command-line thing. You don't run it in python.
    For example, on my Mac, I just say:
    $pip install somelib
    pretty easy!

Method 1

Maybe you’d like try run pip in Python shell like this:

>>> import pip
>>> pip.main(['install', 'requests'])

This will install requests package using pip.


Because pip is a module in standard library, but it isn’t a built-in function(or module), so you need import it.

Other way, you should run pip in system shell(cmd. If pip is in path).

Method 2

I have a Mac, but luckily this should work the same way:

pip is a command-line thing. You don’t run it in python.

For example, on my Mac, I just say:

$pip install somelib

pretty easy!

Conclusion

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read