Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matplotlib problem
#1
This is my source code for Bar graph through Pyplot :
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Matplotlib Problem DaveG 0 1,610 Mar-14-2022, 04:05 AM
Last Post: DaveG
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,221 Mar-11-2021, 10:52 AM
Last Post: buran
  Problem with matplotlib ncm1234 1 1,488 Sep-01-2020, 02:16 AM
Last Post: bowlofred
  Matplotlib animation problem Potatoez 1 2,336 May-21-2019, 03:58 PM
Last Post: Potatoez
  Problem installing numpy and matplotlib achondrite 1 3,117 Jan-16-2019, 11:43 PM
Last Post: snippsat
  problem in plotting intraday results using matplotlib mr_byte31 0 2,945 Aug-20-2018, 11:32 AM
Last Post: mr_byte31

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020