Need help installing 3.71 on Win7 + matplotlib

I have a Python app I wrote on Linux and I’m trying to port to Windows. It works perfectly on Linux

I’ve tried half a dozen or so different suggestions to get this to work, to no avail. It keeps failing at the ‘import matplotlib.pyplot as plt’ line. Here’s the info dump. Whatever I did wrong, I promise I will never, ever do it again, Ok? Thanks in advance.

Traceback (most recent call last):
  File "", line 72, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\
", line 107, in <module>
    from . import _api, cbook, docstring, rcsetup
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\"
, line 26, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\",
 line 82, in <module>
    from matplotlib import _api, cbook, scale
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\",
line 18, in <module>
    from matplotlib.ticker import (
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\",
 line 179, in <module>
    from matplotlib import transforms as mtransforms
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\transforms.
py", line 46, in <module>
    from matplotlib._path import (
ImportError: DLL load failed: The specified module could not be found.

C:\Users\DevGuy\Desktop\PythonApp>py -m pip "freeze"

C:\Users\DevGuy\Desktop\PythonApp>py --version
Python 3.7.1

Howdy Jaf,

your line

import matplotlib.pyplot as plt

works perfectly well in my setup:

My environment had been setup using the Blythooon-Netinstaller (Windows 10):

blythooon · PyPI

Python Runtime Environment for Scientific Applications with Qt based GUI - Blythooon, Part 1 - YouTube

Cheers, Dominik

1 Like

Thanks Dominik! Using that as a breadcrumb I was able to trace that the problem was I needed to install VC++ redistributable (for 2015) from MS in order for matplotlib to work right!

Seems to work fine now!

1 Like