title: Pyinstaller - ModuleNotFoundError: No module named 'cpuinfo'
body: <p>I'm trying to package this script but I keep getting this error message</p>
  <pre><code>Traceback (most recent call last):
    File &quot;systeminfo.py&quot;, line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'cpuinfo'
  [6308] Failed to execute script systeminfo
  
  </code></pre>
  <p>I tried this into cmd</p>
  <pre><code>pyinstaller -F --hidden-import=&quot;cpuinfo&quot; systeminfo.py
  </code></pre>
  <p>I'm on the latest version of pyinstaller and pip.</p>
  <p>This is the import section of my file:</p>
  <pre><code>import psutil, platform, GPUtil, cpuinfo, os, sys, wmi, winreg, getpass
  from tabulate import tabulate
  from datetime import datetime
  </code></pre>
  <p>When I run it, it just opens up and closes out. But when I run it through CMD, that's when I get that error message.</p>
  <p>How do I fix this? I want to include all the modules so I can run this script on different computers that don't have python installed.</p>
  <p>EDIT:
  I fixed this issue by using this thread: Pyinstaller 'failed to execute' script</p>
  <p>I use pycharm so this worked for me.</p>
  <p>The only issue is whenever the CMD opens up, nothing happens. The only thing that can printed is if I hardcode a print(). Functions aren't working at all.</p>