title: PyInstaller - ImportError: No module named _bootlocale
body: <p>Every time I try to compile python file in PyInstaller it returns a lot errors.</p>
  <p>These are the errors of compiling...</p>
  <pre><code>Traceback (most recent call last):
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\runpy.py&quot;, line 197, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File &quot;c:\users\Persong\appdata\local\programs\python\python310\lib\runpy.py&quot;, line 87, in _run_code
      exec(code, run_globals)
    File &quot;C:\Users\Person\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py&quot;, line 7, in &lt;mo
  dule&gt;
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\__main__.py&quot;, line 114
  , in run
      run_build(pyi_config, spec_file, **vars(args))
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\__main__.py&quot;, line 65,
   in run_build
      PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\building\build_main.py
  &quot;, line 725, in main
      build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\building\build_main.py
  &quot;, line 672, in build
      exec(code, spec_namespace)
    File &quot;E:\___Python___\auto.spec&quot;, line 6, in &lt;module&gt;
      a = Analysis(['auto.py'],
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\building\build_main.py
  &quot;, line 242, in __init__
      self.__postinit__()
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\building\datastruct.py
  &quot;, line 160, in __postinit__
      self.assemble()
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\building\build_main.py
  &quot;, line 341, in assemble
      self.graph = initialize_modgraph(
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\depend\analysis.py&quot;, l
  ine 799, in initialize_modgraph
      graph = PyiModuleGraph(
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\depend\analysis.py&quot;, l
  ine 120, in __init__
      self._analyze_base_modules()
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\depend\analysis.py&quot;, l
  ine 288, in _analyze_base_modules
      self._base_modules = [mod
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\depend\analysis.py&quot;, l
  ine 290, in &lt;listcomp&gt;
      for mod in self.import_hook(req)]
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\lib\modulegraph\module
  graph.py&quot;, line 1496, in import_hook
      target_package, target_module_partname = self._find_head_package(
    File &quot;c:\users\Person\appdata\local\programs\python\python310\lib\site-packages\PyInstaller\lib\modulegraph\module
  graph.py&quot;, line 1681, in _find_head_package
      raise ImportError(&quot;No module named &quot; + target_package_name)
  ImportError: No module named _bootlocale
  </code></pre>
  <p>One of the main error that I focused on is given below...</p>
  <pre><code>raise ImportError(&quot;No module named &quot; + target_package_name)
  ImportError: No module named _bootlocale
  </code></pre>