Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Matplotlib ImportError
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!!
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)
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
No module named 'matplotlib'
Now, if I use Thonny matplotlib is working Smile . Instead in VS is not working.

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
(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.
λ python -V
Python 3.7.3

λ 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
λ 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.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Matplotlib : linewidth parameters Zopost 0 185 Aug-16-2019, 07:07 PM
Last Post: Zopost
  hatching not working properly with matplotlib Staph 3 107 Jul-28-2019, 07:17 AM
Last Post: ThomasL
  ImportError: cannot import name 'path' user123 2 244 Jul-14-2019, 10:08 AM
Last Post: Larz60+
  HX711&matplotlib problems olego 0 95 Jul-12-2019, 12:22 PM
Last Post: olego
  Matplotlib problem ift38375 0 113 Jul-02-2019, 02:55 PM
Last Post: ift38375
  ImportError: cannot import name 'gphoto2' from 'sh' evvvonder 1 178 Jul-02-2019, 12:51 AM
Last Post: metulburr
  TimeLapse Help - ImportError: No module named 'sh' evvvonder 4 284 Jun-28-2019, 10:52 PM
Last Post: evvvonder
  ImportError has not raised in pkg_resources module but expected tamilselvanvjm 2 176 Jun-19-2019, 10:06 AM
Last Post: tamilselvanvjm
  Matplotlib contour no data coordinates b4rtt 1 223 Jun-18-2019, 09:36 AM
Last Post: b4rtt
  ImportError: No module named pymysql - On Apache2 for Python 2.7 on Mac Tyrone 9 683 Jun-12-2019, 07:08 PM
Last Post: Tyrone

Forum Jump:

Users browsing this thread: 1 Guest(s)