title: StyleGan3 error: Ninja is required to load C++ extensions
body: <p>I'm trying to run StyleGan3 code but I keep getting this error:</p>
  <p><code>RuntimeError: Ninja is required to load C++ extensions</code></p>
  <p>I did pip install Ninja and got version 1.10.2.3, and I'm on windows 10, so I installed, built and ran docker using these instructions: <a href="https://hangzhang.org/PyTorch-Encoding/notes/compile.html#using-docker" rel="nofollow noreferrer">https://hangzhang.org/PyTorch-Encoding/notes/compile.html#using-docker</a></p>
  <p>This is the full traceback I'm getting:</p>
  <pre><code>Generating image for seed 2 (0/1) ...
  Setting up PyTorch plugin &quot;bias_act_plugin&quot;... Failed!
  Traceback (most recent call last):
    File &quot;D:\Python\stylegan3\stylegan3-main\gen_images.py&quot;, line 143, in &lt;module&gt;
      generate_images() # pylint: disable=no-value-for-parameter
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py&quot;, line 829, in __call__
      return self.main(*args, **kwargs)
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py&quot;, line 782, in main
      rv = self.invoke(ctx)
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py&quot;, line 1066, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File &quot;C:\Users\aAppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py&quot;, line 610, in invoke
      return callback(*args, **kwargs)
    File &quot;D:\Python\stylegan3\stylegan3-main\gen_images.py&quot;, line 135, in generate_images
      img = G(z, label, truncation_psi=truncation_psi, noise_mode=noise_mode)
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py&quot;, line 727, in _call_impl
      result = self.forward(*input, **kwargs)
    File &quot;&lt;string&gt;&quot;, line 503, in forward
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py&quot;, line 727, in _call_impl
      result = self.forward(*input, **kwargs)
    File &quot;&lt;string&gt;&quot;, line 143, in forward
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py&quot;, line 727, in _call_impl
      result = self.forward(*input, **kwargs)
    File &quot;&lt;string&gt;&quot;, line 92, in forward
    File &quot;D:\Python\stylegan3\stylegan3-main\torch_utils\ops\bias_act.py&quot;, line 84, in bias_act
      if impl == 'cuda' and x.device.type == 'cuda' and _init():
    File &quot;D:\Python\stylegan3\stylegan3-main\torch_utils\ops\bias_act.py&quot;, line 41, in _init
      _plugin = custom_ops.get_plugin(
    File &quot;D:\Python\stylegan3\stylegan3-main\torch_utils\custom_ops.py&quot;, line 136, in get_plugin
      torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py&quot;, line 986, in load
      return _jit_compile(
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py&quot;, line 1193, in _jit_compile
      _write_ninja_file_and_build_library(
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py&quot;, line 1268, in _write_ninja_file_and_build_library
      verify_ninja_availability()
    File &quot;C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py&quot;, line 1323, in verify_ninja_availability
      raise RuntimeError(&quot;Ninja is required to load C++ extensions&quot;)
  RuntimeError: Ninja is required to load C++ extensions```
  </code></pre>