sgoldenlab / simba

SimBA (Simple Behavioral Analysis), a pipeline and GUI for developing supervised behavioral classifiers
https://simba-uw-tf-dev.readthedocs.io/
GNU General Public License v3.0
290 stars 141 forks source link

Simba installation error: cannot import name 'run' #167

Closed tyyin12 closed 2 years ago

tyyin12 commented 2 years ago

Hi,

After installing simba and typing simba in my environment, I get the following error:

Traceback (most recent call last): File "C:\Users\Tony\anaconda3\envs\simba\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\Tony\anaconda3\envs\simba\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Tony\anaconda3\envs\simba\Scripts\simba.exe__main__.py", line 4, in File "C:\Users\Tony\anaconda3\envs\simba\lib\site-packages\simba\SimBA.py", line 51, in from simba.train_model_2 import File "C:\Users\Tony\anaconda3\envs\simba\lib\site-packages\simba\train_model_2.py", line 7, in from dtreeviz.trees import File "C:\Users\Tony\anaconda3\envs\simba\lib\site-packages\dtreeviz\trees.py", line 2, in from graphviz.backend import run, view ImportError: cannot import name 'run'

Prior to this issue, I encountered similar issues as mentioned in #154 and #156. After manually pip installing the missing modules and wxpython==4.0.4, I encountered this issue and I am not too sure how to fix it. The python version for the environment is 3.6.10.

Any help would be greatly appreciated!

sronilsson commented 2 years ago

hello @Potato1214!

There seems to be an issue with the version of the graphviz library you have installed, it does not having any methods called run. It maybe that the namings have changed in earlier or later versions of graphviz.

If you do a pip show graphviz what do yo see? If you don't see version 0.11, could you do a pip install graphviz==0.11 and see if that fixes it? (that is the version I have on my machine).