Set environment variables in windows

Ankur Kulhari

While working with java or python many of the times we may come across error of “command not found” while executing command in cmd, even after proper installation of the software.
For python while trying to install a package through command prompt (cmd) following error may be faced:

Python with opencv

Fig1: Python environment variables path is not set in environment variable list

This error can be recovered by adding the path of python to system’s environment variables list by following the below steps:

  1. To add or edit anything environment variables in Windows 7, go to System Properties first.
    Set environment variables in windows

    Fig2: Open system settings

    systems settings

    Fig3: Open Systems settings

  2. Go to “Advanced” tab and in that open environment variables:
    environment variables

    Fig4: Open environment variables

  3. Select “Path” under Variable column and press “edit” button:
    python environment variables

    Fig5: Edit variable path

    Note that you have to enter variable path separated by “;”, i.e. for python 2.7 you need to add “C:\Python27\;C:\Python27\Scripts;”

Install python 2.7.13 with image processing tool OpenCV.

Comments 1

  1. Pingback: Installing Python 2.7 with OpenCV on windows for Image Processing

What do you think about the article?

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