How to install OpenCV on python
You need to add the path of your pip installation to your PATH system variable. By default, pip is installed to C:\Python34\Scripts\pip (pip now comes bundled with new versions of python), so the path "C:\Python34\Scripts" needs to be added to your PATH variable.
To check if it is already in your PATH variable, type echo %PATH% at the CMD prompt
To add the path of your pip installation to your PATH variable, you can use the Control Panel or the set command. For example:
set PATH "%PATH%;C:\Python34\Scripts"
Note: According to the official documentation, "variables set with set variables are available in future command windows only, not in the current command window". In particular, you will need to start a new cmd.exe instance after entering the above command in order to utilize the new environment variable.
I am trying to add OpenCV to my python by using pip install but i get the error
##'pip' is not recognized as an internal or external command,
operable program or batch file.
when i use the echo %PATH% i get this
##C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Users\jashp\AppData\Local\Programs\Python\Python39;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Users\jashp\AppData\Local\Programs\Python\Python39;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Users\jashp\AppData\Local\Microsoft\WindowsApps;C:\Python34\Scripts;;C:\Python34\Scripts
I even tried C:\Users\jashp>setx PATH "%PATH%;C:\pip" and got
##SUCCESS: Specified value was saved.
then i tried C:\Users\jashp>pip install numpy and got
'pip' is not recognized as an internal or external command,
operable program or batch file.
The path to my Python is -C:\Users\jashp\AppData\Roaming\Python