title: Pythonnet .NET 6
body: <p>After hours of searching and trial and error, I finally decided to ask you guys for help.
  As I'm trying to call some functions from a .NET 6 open source project from python, I installed python3.8.4 on my raspberry pi and managed to install the pythonnet 3.0.0 module.</p>
  <p>my app.runtime.json is the following:</p>
  <pre><code>{
    &quot;runtimeOptions&quot;: {
     &quot;tfm&quot;: &quot;net6.0&quot;,
     &quot;framework&quot;: {
      &quot;name&quot;: &quot;Microsoft.NETCore.App&quot;,
      &quot;version&quot;: &quot;6.0.102&quot;
      }
     }
  }
  </code></pre>
  <p>and when I try to load the CLR like this:</p>
  <pre><code>from clr_loader import get_coreclr
  from pythonnet import set_runtime
  
  rt = get_coreclr(&quot;app.runtime.json&quot;)
  set_runtime(rt)
  import sys
  </code></pre>
  <p>I get the following error message:</p>
  <blockquote>
  <p>RuntimeError                              Traceback (most recent call
  last) Input In [11], in 
  1 from clr_loader import get_coreclr
  2 from pythonnet import set_runtime
  ----&gt; 4 rt = get_coreclr(&quot;app.runtime.json&quot;)
  5 set_runtime(rt)
  6 import sys</p>
  <p>File ~/.local/lib/python3.8/site-packages/clr_loader/<strong>init</strong>.py:42,
  in get_coreclr(runtime_config, dotnet_root, properties)
  39 from .hostfxr import DotnetCoreRuntime
  41 if dotnet_root is None:
  ---&gt; 42     dotnet_root = find_dotnet_root()
  44 impl = DotnetCoreRuntime(runtime_config=runtime_config, dotnet_root=dotnet_root)
  45 if properties:</p>
  <p>File ~/.local/lib/python3.8/site-packages/clr_loader/util/find.py:22,
  in find_dotnet_root()
  20 dotnet_path = shutil.which(&quot;dotnet&quot;)
  21 if not dotnet_path:
  ---&gt; 22     raise RuntimeError(&quot;Can not determine dotnet root&quot;)
  24 try:
  25     # Pypy does not provide os.readlink right now
  26     if hasattr(os, &quot;readlink&quot;):</p>
  <p>RuntimeError: Can not determine dotnet root</p>
  </blockquote>
  <p>I exported the path to my dotnet 6.0 sdk to PATH and when I use &quot;dotnet --version&quot; it prints out 6.0.102.</p>
  <p>What can I possibly have done wrong?</p>
  <p>Thanks in advance,</p>
  <p>Epi</p>