title: Error when using pyinstaller: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff
body: <p>I have an issue when i compile a PyQt code with pyinstaller.</p>
  
  <p>I use this line to compile:</p>
  
  <pre><code>c:\Anaconda3\Scripts\pyinstaller.exe -y -F --distpath="." MyQt.py
  </code></pre>
  
  <p>then I get this error message:</p>
  
  <pre><code>      File "c:\anaconda36bis\lib\site-packages\PyInstaller\hooks\hook-zmq.py", line
  18, in &lt;module&gt;
      hiddenimports.extend(collect_submodules('zmq.backend'))
    File "c:\anaconda36bis\lib\site-packages\PyInstaller\utils\hooks\__init__.py",
   line 619, in collect_submodules
      repr(pkg_dir), package))
    File "c:\anaconda36bis\lib\site-packages\PyInstaller\utils\hooks\__init__.py",
   line 90, in exec_statement
      return __exec_python_cmd(cmd)
    File "c:\anaconda36bis\lib\site-packages\PyInstaller\utils\hooks\__init__.py",
   line 77, in __exec_python_cmd
      txt = exec_python(*cmd, env=pp_env)
    File "c:\anaconda36bis\lib\site-packages\PyInstaller\compat.py", line 562, in
  exec_python
      return exec_command(*cmdargs, **kwargs)
    File "c:\anaconda36bis\lib\site-packages\PyInstaller\compat.py", line 369, in
  exec_command
      out = out.decode(encoding)
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 152: invali
  d start byte
  </code></pre>
  
  <p>The error message is not clear to me and I don't understand why this happens.</p>
  
  <p>Is it possible that pyinstaller try to use a module which is not compatible?
  I use these in my script:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  # from PyQt5.QtGui import *
  from PyQt5.QtCore import *
  from PyQt5.QtWidgets import * 
  import sys
  import numpy as np
  import matplotlib
  matplotlib.use('Qt5Agg')
  from matplotlib.figure import Figure
  from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as     FigureCanvas
  from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as     NavigationToolbar
  from scipy.ndimage import imread
  from scipy.ndimage.morphology import binary_dilation
  from scipy.optimize import curve_fit, leastsq
  </code></pre>
  
  <h2>update</h2>
  
  <p>the issue printed in the console come directly after </p>
  
  <pre><code>142859 INFO: Loading module hook "hook-zmq.py"...
  </code></pre>
  
  <p>So it should mean that the error is coming from zmq?</p>