Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matplotlib ImportError
#1
Hi! I am a beginner in Python.
I installed the Python extension MatPlotLib, but
it does not work. When I write 'import matplotlib'
Python displays the error "ImportError: DLL load failed:
impossible to find the specified module.

Thanks for your help!!
Robertino,
Italy
Reply
#2
A few questions:
  • how did you install the package?
  • what version of python are you using?
  • what is your OS?
Also, please show entire unmodified error message (using error tags)
Reply
#3
Hi!
I use Thonny that it has the Python included (version 3.7.2 32 bit) and I downloaded the maplotlib extensions with Thonny.
I also tried to installed Matplotlib with the command pip install matplotlib, but it does not work.
Excuse for my English, my native Language is Italian.
Today, I installed Visual Studio Community with Python support and Python 3.7.3 32 bit and 64 bit version and I installed matplotlib inside Visual Studio. But also with VS, the library matplotlib does not work, the message here is
Error:
No module named 'matplotlib'
Now, if I use Thonny matplotlib is working Smile . Instead in VS is not working.

Bye!
Reply
#4
The standard way to load matplotlib is with pip
from command line:
pip install matplotlib
If installed in this manner, should work with any IDE.

You may have more than one version of python installed.
Make sure you have installed to the proper version
for pip:
pip -V
and also check
pip3 -V
Reply
#5
(Jun-14-2019, 07:38 AM)robertinoc Wrote: Now, if I use Thonny matplotlib is working . Instead in VS is not working.
Thonny comes with python.
Thonny Wrote:Easy to get started. Thonny comes with Python 3.7 built in

Quote:Today, I installed Visual Studio Community
It would have been better to install VS Code
Look at VS Code from start
In VS Code you can point to the Python 3.7 interpreter in Thonny,then VS Code will use that version and matplotlib will work.

Can also install Python 3.6/3.7 and pip installation under Windows.
The have that as Windows main version in Path(work from anywhere in cmd or better cmder).
Then in look like this.
C:\Users\Tom
λ python -V
Python 3.7.3

C:\Users\Tom
λ pip -V
pip 19.1.1 from c:\python37\lib\site-packages\pip (python 3.7)

# Now matplotlib will be install to version pip point to over
C:\Users\Tom
λ pip install matplotlib --upgrade
Collecting matplotlib
  Downloading ........
Successfully installed matplotlib-3.1.0
In VS Code is easy to switch interpreter look at tutorial,so now should matplotlib work in both version.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,160 Mar-11-2021, 10:52 AM
Last Post: buran

Forum Jump:

User Panel Messages

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