sollan / alma

Fully automated (rodent) limb motion analysis toolbox for behavioral analysis with bodypart coordinate data, building upon markerless pose estimation.
GNU General Public License v3.0
13 stars 5 forks source link

Alma. py is not starting #24

Closed VenkateshLab closed 1 year ago

VenkateshLab commented 1 year ago

I'm installing alma in MAC OS 13.0.1

This is how is install alma

created my conda enviroment for alma

conda create --name alma python=3.8

instalation of alma

pip install -r requirements.txt it installed all the required packages.

trying to start alma it shows the following error.

python ./alma.py Traceback (most recent call last): File "./alma.py", line 2, in from Panels import Start, AnalyzeStride, AnalyzeFootfall, RandomForest, PCA File "/Users/manojkumark/Desktop/alma/Panels/RandomForest.py", line 3, in from Functions import ConfigFunctions, DataAnalysisFunctions File "/Users/manojkumark/Desktop/alma/Functions/DataAnalysisFunctions.py", line 5, in from sklearn.ensemble import RandomForestClassifier File "/Users/manojkumark/opt/anaconda3/envs/alma/lib/python3.8/site-packages/sklearn/ensemble/init.py", line 17, in from ._gb import GradientBoostingClassifier File "/Users/manojkumark/opt/anaconda3/envs/alma/lib/python3.8/site-packages/sklearn/ensemble/_gb.py", line 33, in from ._gradient_boosting import predict_stages File "init.pxd", line 918, in init sklearn.ensemble._gradient_boosting RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 232 from PyObject

sollan commented 1 year ago

Hi! This seems like a duplicate issue of #18. Please try the following steps and see if that helps eliminate the error:

https://github.com/sollan/alma/issues/18#issuecomment-1248120915

VenkateshLab commented 1 year ago

Hi! @sollan , still i'm facing the same issue even after following the instruction for installing the alma.

image
sollan commented 1 year ago

Can you post the commands you used during installation please? Also, please make sure to start from a fresh environment without any previously installed packages.

What might also help is to avoid using conda, for example following these other instructions from the same thread: https://github.com/sollan/alma/issues/18#issuecomment-1147513572

VenkateshLab commented 1 year ago

@sollan i have provided the instalation steps for alma.

I have installed anaconda

creating a conda environment and installing python 3.8.5

conda create --name alma
conda activate alma
conda install -c conda-forge python=3.8.5

downloading the alma from github and installing wxpython

git clone https://github.com/sollan/alma.git
cd alma
conda install -c conda-forge wxPython
pip install -r requirements.txt

starting alma

pythonw ./alma.py

Traceback (most recent call last):
  File "alma.py", line 2, in <module>
    from Panels import Start, AnalyzeStride, AnalyzeFootfall, RandomForest, PCA
  File "/Users/manojkumark/Desktop/alma/Panels/RandomForest.py", line 3, in <module>
    from Functions import ConfigFunctions, DataAnalysisFunctions
  File "/Users/manojkumark/Desktop/alma/Functions/DataAnalysisFunctions.py", line 5, in <module>
    from sklearn.ensemble import RandomForestClassifier
  File "/Users/manojkumark/opt/anaconda3/envs/alma/lib/python3.8/site-packages/sklearn/ensemble/__init__.py", line 17, in <module>
    from ._gb import GradientBoostingClassifier
  File "/Users/manojkumark/opt/anaconda3/envs/alma/lib/python3.8/site-packages/sklearn/ensemble/_gb.py", line 33, in <module>
    from ._gradient_boosting import predict_stages
  File "__init__.pxd", line 918, in init sklearn.ensemble._gradient_boosting
RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 232 from PyObject
sollan commented 1 year ago

According to instructions linked above (for Anaconda), you also need to

in requirements.txt, change scikit-learn==0.22.2.post1 to scikit-learn>=0.22.2.post1

before pip install -r requirements.txt.

Please check if that helps. Otherwise I would recommend trying the installation steps without Anaconda.

VenkateshLab commented 1 year ago

@sollan i have tried that also using pip install -r requirements.txt before also.

I get the same error when i tried without Anaconda. even after changing the scikit-lern>=0.22.2.post1

also im getting same error even after installing without anaconda.

image

sollan commented 1 year ago

Ok that's strange. Did you uninstall everything before trying?

Because it seems pip install didn't work, instead it just kept all the packages from the previous installation ("requirement already satisfied). As you can see the scikit-learn==0.22.2.post1 is still in the output. So it makes sense the error is still there.

VenkateshLab commented 1 year ago

I have reinstalled them, still the same error is happening. scikit-learn==0.22.2.post1 has been modifed to scikit-learn>=0.22.2.post1

image

sollan commented 1 year ago

Hi! I saw there's a recent change in the requirements.txt to fix a dependency vulnerability. That's likely the reason.

Please run this with the virtual environment activated to downgrade to a lower numpy version:

pip install --upgrade numpy==1.18.2

This appears to be a duplicate issue of https://github.com/sollan/alma/issues/21, both happened after the dependency update.

VenkateshLab commented 1 year ago

Now its says me to upgrade my numpy. is there any docker container of alma wich will be usefull for fixing these issues.

image

sollan commented 1 year ago

is there any docker container of alma wich will be usefull for fixing these issues.

Unfortunately not.

Now its says me to upgrade my numpy.

Please downgrade pandas to the minimum required version (1.0.3) (and the same goes for any further errors that arise).

VenkateshLab commented 1 year ago

@sollan, i have downgraded the padas version to 1.0.3 then it shows your to upgrade my numpy to 1.19 so i did that. Now it came back to a new error.

image

sollan commented 1 year ago

Seems like the numpy error is fixed then.

To resolve the current issue in the easiest way, please downgrade any dependency that's reporting deprecations, incompatibilities, etc. (because the installed version is too high), to the minimum required version stated in the requirements.txt, as these are the versions that have been tested to be compatible.

In this case, downgrade matplotlib to 3.2.1 as stated in the requirements.txt. The same goes for further incompatibilities:

Downgrade to the minimum required version when a package is too "advanced" and not yet tested to be compatible.

VenkateshLab commented 1 year ago

@sollan thanks now its working.

had to downgrade numpy ==1.19, matplotlib==3.2.1 and pandas==1.0.3.

sollan commented 1 year ago

Good to know :) I will update the dependencies correspondingly.

VenkateshLab commented 1 year ago

@sollan I have updated the requirements file. requirements.txt