This is my source code for Bar graph through Pyplot :
when i am trying in Script mode then it gives error as given below :
My problem has been resolved after installing :
vc_redist.x86.exe
Thanks
import matplotlib.pyplot as plt x = [2,4,6,8,10] y=[3,9,11,2,6] plt.bar(x,y,label ='Bars') plt.xlabel('X-axis') plt.ylabel('Y-axis') plt.title('Bar Graph1') plt.legend() plt.show()When i am running code in interactive mode = then it fine and gives output but
when i am trying in Script mode then it gives error as given below :
Output:Traceback (most recent call last):
File "C:/Users/Bhavik/Desktop/bar1.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\Bhavik\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\__init__.py", line 200, in <module>
_check_versions()
File "C:\Users\Bhavik\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\__init__.py", line 194, in _check_versions
module = importlib.import_module(modname)
File "C:\Users\Bhavik\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
How can i solve this issue ?My problem has been resolved after installing :
vc_redist.x86.exe
Thanks