RuntimeError: CPU dispatcher tracer already initialized

Traceback (most recent call last):
  File "rhinocode:///grasshopper/1/68254ed6-a8aa-4c24-81aa-996a45fa29e6/72178cd4-4eea-44d3-bb37-5c15c2ae2232", line 1, in <module>
  File "C:\Users\tallu\.rhinocode\py39-rh8\site-envs\default-7oeVr66U\numpy\__init__.py", line 143, in <module>
    from numpy.__config__ import show as show_config
  File "C:\Users\tallu\.rhinocode\py39-rh8\site-envs\default-7oeVr66U\numpy\__config__.py", line 4, in <module>
    from numpy._core._multiarray_umath import (
  File "C:\Users\tallu\.rhinocode\py39-rh8\site-envs\default-7oeVr66U\numpy\_core\__init__.py", line 23, in <module>
    from . import multiarray
  File "C:\Users\tallu\.rhinocode\py39-rh8\site-envs\default-7oeVr66U\numpy\_core\multiarray.py", line 10, in <module>
    from . import overrides
  File "C:\Users\tallu\.rhinocode\py39-rh8\site-envs\default-7oeVr66U\numpy\_core\overrides.py", line 8, in <module>
    from numpy._core._multiarray_umath import (
RuntimeError: CPU dispatcher tracer already initlized

I face this issue in Rhino 8. has anyone faced the same. if yes, how did you resolve this?

Which Rhino version?

I had a same issue in Rhino 8 /grasshopper when I import pandas

In my case it was not occurred before I install few Grasshopper Plugins (LadyBug, Butterfly)

I will report here if I solve this problem.

1 Like

@Namdev
I solved my case, but Iโ€™m not sure it will work for you.
In my case, after I reset my labtop. I didnโ€™t add Rhino env directory to in my Environmental Variables.
I think thatโ€™s why it occurs crash, because If we donโ€™t add Rhino env directory, python in Rhino look for packages from other directory(which is already using numpy or multiarray in some reason).
You should find your Rhino python Script folder and add it to Environment Variables like this

C:\Users\USERNAME.rhinocode\py39-rh8\Scripts

I hope this will work for you.