0

I have installed Python Pip for the purpose of installing Pyaudio.
I have downloaded PyAudio‑0.2.8‑cp26‑none‑win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio and placed it in my desktop. Here is the CMD log.

C:\Users\Shadow Mori> cd C:\users\shadow mori\desktop 
C:\Users\Shadow Mori\Desktop> pip install PyAudio‑0.2.8‑cp26‑none‑win32.whl 
'pip' is not recognized as an internal of external command, 
operable program or batch file.
C:\Users\Shadow Mori\Desktop>

When I change the directory to C:\python26\scripts\ pip is recognised, but I can't get to PyAudio‑0.2.8‑cp26‑none‑win32.whl no matter what the directory is. I have tried adding the System Variable of C:\python26\Scripts\ like you do with Python but it doesn't work either.
Thanks in advance for any help at all.

jordanm
  • 26,799
  • 4
  • 56
  • 64
Jack Brand
  • 13
  • 1
  • 2
  • 7
  • 1
    http://stackoverflow.com/questions/23708898/pip-is-not-recognized-as-an-internal-or-external-command-installing-django-w – ahmed Sep 26 '15 at 23:38

2 Answers2

2

When you type a command in the command prompt, it looks in a number of directories to find the executable. This is usually the current directory and the directories listed in the PATH environment variable.

A one-off solution is to provide the full path to the command, which skips the search entirely and tells windows exactly what you want to do...

cd C:\users\shadow mori\desktop
C:\python26\scripts\pip install PyAudio‑0.2.8‑cp26‑none‑win32.whl 

(You could also cd to the scripts directory and instead provide the full path to the .whl)

A more permanent solution is to add the python scripts folder to your path.

This varies depending on your version of windows, but on Win7 and 8 is Control Panel->System->Advanced System Settings->Environment Variables (button)

In the bottom half of the window, find PATH and edit it.

enter image description here

Add ;C:\Python26\Scripts to the end of the existing value. The semicolon is to separate it from previous values. Eg:

enter image description here

The change will take effect for all new command prompts. You should now be able to run pip (or any other command in the scripts directory) from any location.

Basic
  • 25,223
  • 23
  • 108
  • 188
  • I already have Python folder added to path. Is it necessary to add another entry to `Python27\Scripts` ? – Sndn Dec 15 '17 at 07:56
  • 1
    @Sndn Windows will look in the directories specified in the PATH. It won't look in sub directories. Find which folder the .exe is in, and add that to the PATH. Don't forget to open a new command prompt for it to take effect. – Basic Dec 15 '17 at 22:34
0

Add two paths like-> "C:\Users\AppData\Local\Continuum\anaconda3\Scripts" &

"C:\Users\AppData\Local\Continuum\anaconda3" to your system variable path.

This should work.

Shalini Baranwal
  • 1,898
  • 2
  • 20
  • 31