Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (12.7k points)

I'm attempting to install the pandas package utilizing pip to run a few pandas-based Python programs. I previously installed pip. I took a stab at googling and SO'ing yet didn't discover an answer for this mistake. Would somebody be able to share your contributions on this?

C:\> pip install pandas

Error:

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

1 Answer

0 votes
by (26.4k points)

Since both pip nor python orders are not introduced along with Python in Windows, you should utilize the Windows alternative py, which is incorporated naturally when you installed Python. At that point, you have the alternative to indicate a general or explicit version number after the py order.

C:\> py      -m pip install pandas  %= one of Python on the system =%

C:\> py -2   -m pip install pandas  %= one of Python 2 on the system =%

C:\> py -2.7 -m pip install pandas  %= only for Python 2.7 =%

C:\> py -3   -m pip install pandas  %= one of Python 3 on the system =%

C:\> py -3.6 -m pip install pandas  %= only for Python 3.6 =%

On the other hand, to get pip to work without py - m part, you should add pip to the PATH environment variable.

C:\> setx PATH "%PATH%;C:\<path\to\python\folder>\Scripts"

Now, try to execute the accompanying command:

C:\> pip install pandas

Want to become an expert in Python? Join the python course fast!

Related questions

Browse Categories

...