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 "PythonApp.py", line 72, in <module>
    import matplotlib.pyplot as plt
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\__init__.py
", line 107, in <module>
    from . import _api, cbook, docstring, rcsetup
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\rcsetup.py"
, 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\colors.py",
 line 82, in <module>
    from matplotlib import _api, cbook, scale
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\scale.py",
line 18, in <module>
    from matplotlib.ticker import (
  File "C:\Users\DevGuy\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\ticker.py",
 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"
cycler==0.10.0
kiwisolver==1.3.1
matplotlib==3.4.2
numpy==1.20.3
Pillow==8.2.0
pyparsing==2.4.7
python-dateutil==2.8.1
six==1.16.0

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

the same problem again

tried in Python 3.8 for Windows 7, 32-bit
C++ 2010 Redistributable
installed
‘’’

# Python program to read .csv file

import numpy as np
import matplotlib.pyplot as plt
import csv

‘’’
generated the following errors, crashing Python 3.8

Blockquote

===
Problem Caption:
Problem Event Name: APPCRASH
Application name: python.exe
Application version: 3.8.7150.1013
Application time signature: 5fe0df5a
Error module name: _multiarray_umath.cp38-win32.pyd
Version of the module with the error: 0.0.0.0
Time signature of the module with the error: 63dfe4cf
Exception code: c000001d
Exception offset: 000269c9
Operating system version: 6.1.7601.2.1.0.256.48
Regional Settings ID: 1045
Additional information 1: 0a9e
Additional information 2: 0a9e372d3b4ad19135b953a78882e789
Additional information 3: 0a9e
Additional information 4: 0a9e372d3b4ad19135b953a78882e789

Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:43:54) [MSC v.1928 32 bit (In
tel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

‘’’

        import matplotlib.pyplot as plt
        ‘’’

crashes Python, generating the following error/bug message

Problem Caption:
Problem Event Name: APPCRASH
Application name: python.exe
Application version: 3.8.7150.1013
Application time signature: 5fe0df5a
Error module name: _multiarray_umath.cp38-win32.pyd
Version of the module with the error: 0.0.0.0
Time signature of the module with the error: 63dfe4cf
Exception code: c000001d
Exception offset: 000269c9
Operating system version: 6.1.7601.2.1.0.256.48
Regional Settings ID: 1045
Additional information 1: 0a9e
Additional information 2: 0a9e372d3b4ad19135b953a78882e789
Additional information 3: 0a9e
Additional information 4: 0a9e372d3b4ad19135b953a78882e789

Blockquote

You’re reporting an unrelated problem. " _multiarray_umath.cp38-win32.pyd" from the numpy package is causing a STATUS_ILLEGAL_INSTRUCTION (0xC000001D) exception to be raised. Either the PYD (i.e. DLL by another name) is corrupt or a bug in it caused the instruction pointer to jump to an address that has an instruction that’s illegal to execute in user mode.