title: OSError: [WinError 193] %1 is not a valid Win32 application - when trying to import numpy
body: <p>I can install numpy or pandas, but I can't import them in cmd, jupyter notebook or sublime text. (However, I can install and import them in Pycharm).</p>
  
  <p>I've already searched different forums/stackoverflow, seeking for an answer, but the most common causes like architecture mismatch (I use Python 32-bit) or spaces in paths seem not to be the issue here.
  I've tried reinstall Python, but it didn't solve the problem.</p>
  
  <p>The error always points out at "ctypes" lib and it seems to be a problem with numpy module specifically. When I try to import pandas/matplotlib it fails with importing numpy.</p>
  
  <pre><code>&gt;&gt;&gt; import numpy
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\jadwi\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in &lt;module&gt;
      from . import core
    File "C:\Users\jadwi\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in &lt;module&gt;
      WinDLL(os.path.abspath(filename))
    File "C:\Users\jadwi\AppData\Local\Programs\Python\Python37-32\lib\ctypes\__init__.py", line 356, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: [WinError 193] %1 is not a valid Win32 application
  
  &gt;&gt;&gt; help('numpy')
  problem in numpy - OSError: [WinError 193] %1 is not a valid Win32 application 
  
  &gt;&gt;&gt; import pandas
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "C:\Users\jadwi\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\__init__.py", line 13, in &lt;module&gt;
      __import__(dependency)
    File "C:\Users\jadwi\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in &lt;module&gt;
      from . import core
    File "C:\Users\jadwi\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in &lt;module&gt;
      WinDLL(os.path.abspath(filename))
    File "C:\Users\jadwi\AppData\Local\Programs\Python\Python37-32\lib\ctypes\__init__.py", line 356, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: [WinError 193] %1 is not a valid Win32 application
  </code></pre>
  
  <p>I know people had this error before, but, as I mentioned, it seems not to be an architecture mismatch problem, there are no spaces in the paths and I'm really stuck with it. Any suggestions on how to solve it will be very appreciated.</p>