title: Pyinstaller create an executable with external libraries
body: <p>I am trying to create an executable file (exe) for a Python script that I written in PyCharm.
  When I run the script from the PyCharm is working fine but when I try to run it as an individual .py or try to run the exe I am getting an error.</p>
  
  <p>The issue I believe is with the "from infi.devicemanager import DeviceManager" library. </p>
  
  <pre><code>from infi.devicemanager import DeviceManager # Used for the retrievement of Device manager information
  dm = DeviceManager()
  dm.root.rescan()
  devs = dm.all_devices # Get all the devices to a list called devs
  for d in devs:
      print (d.description)
  </code></pre>
  
  <p>I get following error:</p>
  
  <pre><code>PS C:\Python&gt; python.exe .\tests.py
  Traceback (most recent call last):
    File ".\tests.py", line 1, in &lt;module&gt;
      import infi.devicemanager # Used for the retrievement of Device manager information
  ModuleNotFoundError: No module named 'infi'
  
  PS C:\Python&gt; pyinstaller -F .\tests.py
  
  PS C:\Python\dist&gt; .\tests.exe
  Traceback (most recent call last):
    File "tests.py", line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'infi'
  [15072] Failed to execute script tests
  </code></pre>
  
  <p>Is there a way to include this library to the exe file so anyone without python can run this script?
  I am open to suggestions.</p>
  
  <p>Thank you in advance!</p>
  
  <p>=== UPDATE ===
  Full script can be found here
  <a href="https://github.com/elessargr/k9-serial" rel="nofollow noreferrer">https://github.com/elessargr/k9-serial</a></p>