0

Someone know about this problem?

(Using Sublime Text) from matplotlib import pyplot

Traceback (most recent call last):
  File "C:\Users\Lorrety\Desktop\tarea9.py", line 1, in <module>
    from matplotlib import pyplot
  File "C:\Users\Lorrety\AppData\Roaming\Python\Python38\site-packages\matplotlib\__init__.py", line 139, in <module>
    from . import cbook, rcsetup
  File "C:\Users\Lorrety\AppData\Roaming\Python\Python38\site-packages\matplotlib\cbook\__init__.py", line 32, in <module>
    import numpy as np
  File "C:\Users\Lorrety\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in <module>
    from . import _distributor_init
  File "C:\Users\Lorrety\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\Lorrety\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
Klaus D.
  • 13,874
  • 5
  • 41
  • 48
  • Does this help?: https://stackoverflow.com/questions/25651990/oserror-winerror-193-1-is-not-a-valid-win32-application There's answers there about 32-bit vs 64-bit installations of python on Windows. It sounds possibly like you've installed and are running the 32-bit version of python but have installed matplotlib with 64-bit executables. – cronburg Jul 21 '20 at 16:24
  • Can you import numpy? `import numpy as np`. `from matplotlib import pyplot` is itself not wrong, but must people import it like this `import matplotlib.pyplot as plt` this way it is in the same style like most examples you find online. – HackLab Jul 21 '20 at 16:26
  • 1
    Does this answer your question? [OSError: \[WinError 193\] %1 is not a valid Win32 application](https://stackoverflow.com/questions/25651990/oserror-winerror-193-1-is-not-a-valid-win32-application) – Trenton McKinney Jul 21 '20 at 17:13

0 Answers0