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
289 stars 141 forks source link

I faile to install SimBA on MacOS Ventura 13.4.1 #271

Open DorianBattivelli opened 1 year ago

DorianBattivelli commented 1 year ago

Hello,

I tried to follow these steps:

Create an environment for simba using anaconda terminal.

In the terminal type, pip install simba-uw-tf-dev

Then, conda install -c anaconda python.app

Then, conda install matplotlib

Then, conda uninstall shapely

Then, conda install -c conda-forge shapely

Then, pip install shap

Lastly, pip install h5py

In the terminal, type in simba to test if it works.

But here what I get:

Screenshot 2023-07-03 alle 11 33 51

I checked and both Pip and setuptools are up to date. Do you have an idea what is going wrong here?

Thank you, Best,

sronilsson commented 1 year ago

Hi @DorianBattivelli! It looks like your running python3.9. how does it look when you run it in 3.6?

PS. Latest SimBA should run in python >3 6, including 3.9, but requires slightly different installation, including downgrade setuptools and pip I think. But I haven't had time to write documentation. But if I really need 3.9 I can write it.

DorianBattivelli commented 1 year ago

Indeed, I tried to specify the python version, but somehow I cannot do it:

Screenshot 2023-07-03 alle 14 56 23
DorianBattivelli commented 1 year ago

Using "python3.6 pip install simba-uw-tf-dev" command, it looks that it moves forward, but I still face the issue:

Screenshot 2023-07-03 alle 15 06 12
sronilsson commented 1 year ago

I can't see it in the second screengrab, but in the first, you have created a conda environment for simba using python 3.9:

image

Instead, when creating the conda environment, do e.g.,:

1) conda create -n simba_env python=3.6 anaconda 2) conda activate simba_env 3) pip install simba-uw-tf-dev

DorianBattivelli commented 1 year ago

Everything run well at first, but an error popped out at the end, and it seems to prevent SimBA to work properly:

Screenshot 2023-07-03 alle 15 52 27
DorianBattivelli commented 1 year ago

Ohh wait maybe I should go through the following commands (matplotlib etc.), I'm giving a go..

sronilsson commented 1 year ago

maybe use pip install simba-uw-tf-dev --ignore-installed

DorianBattivelli commented 1 year ago

Still not working :/

Screenshot 2023-07-03 alle 16 23 26
sronilsson commented 1 year ago

I think this is a pandas and numpy version mismatch, which version of numpy and pandas do you have pip show numpy and pip show pandas ?

DorianBattivelli commented 1 year ago

Numpy: 1.18.1 Pandas: 1.0.5

sronilsson commented 1 year ago

If you try: pip install pandas==0.25.3, how does it look?

DorianBattivelli commented 1 year ago

Here again I have error:

Screenshot 2023-07-04 alle 09 27 03
sronilsson commented 1 year ago

Tro do do pip uninstall matplotlib then conda install matplotlib

DorianBattivelli commented 1 year ago

To resume, I did from scratch:

conda create -n simba_env python=3.6 anaconda
conda activate simba_env
pip install simba-uw-tf-dev --ignore-installed
pip install pandas==0.25.3
pip uninstall matplotlib
conda install matplotlib

And here what I get:

Screenshot 2023-07-04 alle 13 25 18
sronilsson commented 1 year ago

Did conda install matplotlib run properly? This suggests you don't have matplotlib in the environment. Did you type y after to confirm install?

DorianBattivelli commented 1 year ago

I just relaunched the command, and here another error:

Screenshot 2023-07-04 alle 14 37 47
sronilsson commented 1 year ago

This is a shapely error again, try:

pip uninstall shapely conda install shapely

DorianBattivelli commented 1 year ago

Then terminal returns:

Screenshot 2023-07-04 alle 15 12 58
sronilsson commented 1 year ago

:) This is an sklearn error, which version of scikit do you have? pip show scikit-learn

DorianBattivelli commented 1 year ago

0.23.1

sronilsson commented 1 year ago

If you do pip uninstall imblearn then pip install imblearn?

DorianBattivelli commented 1 year ago

Damn :)

Screenshot 2023-07-04 alle 16 35 57
sronilsson commented 1 year ago

can you try pip install scikit-learn==0.22.2 ?

DorianBattivelli commented 1 year ago

It's giving the same outcome

Screenshot 2023-07-04 alle 17 33 26
sronilsson commented 1 year ago

Does ant of these potential fixes do it? https://stackoverflow.com/questions/56549270/importerror-cannot-import-name-multioutputmixin-from-sklearn-base

DorianBattivelli commented 1 year ago

Ok, I managed to install it, what I did:

And then run all these commands from this env:

pip install simba-uw-tf-dev

Then, conda install -c anaconda python.app

Then, conda install matplotlib

Then, conda uninstall shapely

Then, conda install -c conda-forge shapely

Not sure what solved the problem here... :D

Thank you!

sronilsson commented 1 year ago

Great!

DorianBattivelli commented 1 year ago

Just to let you know, it's working, but when I'm launching the program I see some errors in the terminal:

Screenshot 2023-07-05 alle 01 36 11

Do you think it can be problematic for a stable use of SimBA?

sronilsson commented 1 year ago

You should be OK, just a warning that it might break if you update matplotlib to a newer version