At times, this may be due to the fact that you have not configured your Oracle home in the environment variables.
Go to, System Properties-->Advanced-->Environment Variables Add new and enter variable name as Oracle_Home and include the oracle home folder path to the variable value.