I can not run python scripts on Command Prompt which has to import any module whereas I can run that script without any error on python IDLE. I think, this is happening after I install Anaconda on my machine.
Even if I run "Python" command it starts the shell and then there I can import any module that I want without any error.
C:\Users\USER>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>>
But when I try to run a script which has to import any module directly It rises a "ModuleNotFoundError" error.
E:\Python\PyQt4\Apps\test>main.py
Traceback (most recent call last):
File "E:\Python\PyQt4\Apps\test\main.py", line 9, in <module>
from PyQt4 import QtCore, QtGui
ModuleNotFoundError: No module named 'PyQt4'
E:\Python\PyQt4\Apps\test>
I don't know why it is happening