Open leahsalinsky opened 1 month ago
Hi @leahsalinsky !
I see! There are three things you could try:
i) Us python 3.6 rather than 3.10 - how does it run? ii) If you use a python 3.6 or python 3.10 environment in anaconda, does it work? iii) The error message is about some C++ build tools that is missing in your Microsoft Windows installation. You can install them and it should fix it. There is a detailed guide for how to install them HERE
Simon
Okay, so we tried iii), installing the C++ build tools and it appeared to have downloaded. However, when we type simba into the command prompt, we get this "'simba' is not recognized as an internal or external command, operable program or batch file."
That would mean simba isn't installed - is it possible that you are in an anaconda python environment or a different python environment where you haven't installed simba with pip install simba-uw-tf-dev
?
What do you see if you run pip install simba-uw-tf-dev
?
We get a list of packages saying requirement already satisfied!
if you type pip show simba-uw-tf-dev
what do you see printed?
We get this Name: Simba-UW-tf-dev Version: 2.0.7 Summary: Toolkit for computer classification and analysis of behaviors in experimental animals Home-page: https://github.com/sgoldenlab/simba Author: Simon Nilsson, Jia Jie Choong, Sophia Hwang Author-email: sronilsson@gmail.com License: GNU General Public License v3 (GPLv3) Location: c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages Requires: cefpython3, dash, dash-color-picker, dash-colorscales, dash-core-components, dash-html-components, dtreeviz, eli5, ffmpeg-python, geos, graphviz, h5py, imbalanced-learn, imgaug, imutils, joblib, kaleido, matplotlib, numba, numexpr, numpy, opencv-python, pandas, Pillow, plotly, psutil, pyarrow, pyglet, pyyaml, scikit-image, scikit-learn, scipy, seaborn, shap, shapely, statsmodels, tables, tabulate, tqdm, trafaret, xgboost, xlrd, yellowbrick Required-by:
That looks right.. hmm - but just to confirm again: typing simba
does not work, would you mind sharing the output of what is printed out??
This is what I get!
'simba' is not recognized as an internal or external command, operable program or batch file.
What about if you uninstall it with pip uninstall simba-uw-tf-dev
followed by reinstalling it with pip install simba-uw-tf-dev
? In case something odd happened at the C++ tools installation.
SIMON! You gosh darn genius. As simple as that was, it worked!!!!
great, thanks @leahsalinsky - let me know if anything else comes up!
Hi Simon! Sorry to bother you again, but I was using Simba no problem, but then this morning when I tried to open it by typing simba into the command prompt as before, I started getting this
C:\Users\salinsky\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.10>simba
Traceback (most recent call last):
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\salinsky\AppData\Local\Programs\Python\Python310\Scripts\simba.exe__main.py", line 4, in
and as I am extremely not python savvy, I was wondering if you are able to understand what is happening here?
Hi @leahsalinsky!
Got it - this can happen when SimBA is installed in the main python (i.e., no dedicated conda or no python env) and some package or package version changes (in this case it seems to be matplotlib).
If you do pip show matplotlib
what version do you see?
If you do not see version 3.5.0
, can you do pip install matplotlib==3.5.0
and see if that fixes it?
So, it is showing version 3.5.0...
Alright - if you do pip show pyside6
do you see anything printed out?
I get this C:\Users\salinsky> pip show pyside6 Name: PySide6 Version: 6.4.2 Summary: Python bindings for the Qt cross-platform application and UI framework Home-page: https://www.pyside.org Author: Qt for Python Team Author-email: pyside@qt-project.org License: LGPL Location: c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages Requires: PySide6-Addons, PySide6-Essentials, shiboken6 Required-by:
can you do pip uninstall pyside6 -y
and see if it it runs?
So, after doing that, I got this:
C:\Users\salinsky>simba
Traceback (most recent call last):
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\salinsky\AppData\Local\Programs\Python\Python310\Scripts\simba.exe__main.py", line 7, in
Got it - there seems to be more packages that have changed versions.
If you do pip uninstall simba-uw-tf-dev
followed by pip install simba-uw-tf-dev
, how does it look?
I still get the same error as above... (i apologize for my severe lack of python knowledge.)
When uninstalling, it shows this, which seems a little weird to me: :\Users\salinsky>pip uninstall simba-uw-tf-dev Found existing installation: Simba-UW-tf-dev 2.0.7 Uninstalling Simba-UW-tf-dev-2.0.7: Would remove: c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages.ds_store c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba* c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba_uw_tf_dev-2.0.7.dist-info* c:\users\salinsky\appdata\local\programs\python\python310\scripts\simba.exe Would not remove (might be manually added): c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins__pycache\timeseries_features_mixin.TimeseriesFeatureMixin.percentile_difference-265.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins__pycache\timeseries_features_mixin.TimeseriesFeatureMixin.percentile_difference-265.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins__pycache\timeseries_features_mixin.TimeseriesFeatureMixin.petrosian_fractal_dimension-491.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins__pycache\timeseries_features_mixin.TimeseriesFeatureMixin.petrosian_fractal_dimension-491.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_descriptive_statistics-812.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_descriptive_statistics-812.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percent_beyond_n_std-366.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percent_beyond_n_std-366.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percent_in_percentile_window-448.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percent_in_percentile_window-448.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percentile_difference-295.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_percentile_difference-295.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache__\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_petrosian_fractal_dimension-539.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache__\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_petrosian_fractal_dimension-539.py310.nbi c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache__\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_variance-779.py310.1.nbc c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages\simba\mixins\pycache__\timeseries_features_mixin.TimeseriesFeatureMixin.sliding_variance-779.py310.nbi Proceed (Y/n)? Y Successfully uninstalled Simba-UW-tf-dev-2.0.7
Alright, the issue above is related to OpenCV
. You should have version 4.8.1.78
but I think you have version 4.10 something now.
if you do pip install opencv-python==4.8.1.78
- how does it look?
This is what I get..
C:\Users\salinsky>pip install opencv-python==4.8.1.78 Requirement already satisfied: opencv-python==4.8.1.78 in c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages (4.8.1.78) Requirement already satisfied: numpy>=1.21.2 in c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages (from opencv-python==4.8.1.78) (1.26.4)
C:\Users\salinsky>simba
Traceback (most recent call last):
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\salinsky\appdata\local\programs\python\python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\salinsky\AppData\Local\Programs\Python\Python310\Scripts\simba.exe__main.py", line 7, in
I have absolutely no idea how this happened
When i asked it to show OpenCV, the version seems correct: C:\Users\salinsky>pip show opencv-python Name: opencv-python Version: 4.8.1.78 Summary: Wrapper package for OpenCV python bindings. Home-page: https://github.com/opencv/opencv-python Author: Author-email: License: Apache 2.0 Location: c:\users\salinsky\appdata\local\programs\python\python310\lib\site-packages Requires: numpy Required-by: imgaug, Simba-UW-tf-dev
I don't know either, but chances are some other package, like deeplabcut or sleap or something else, was installed on this computer in the same python. And those packages have other dependencies.
You can try: pip uninstall opencv-python-headless
and see how it goes?
So before you answered I tried C:\Users\salinsky> pip uninstall openCV-python==4.10 and then C:\Users\salinsky> pip install opencv-python==4.8.1.78 and now it opens!
ah nice, well played! 🚀
Hopefully I will not need to bother you again, but I make no promises. Thank you so much again!!!
No bother at all, we are all learning, and I am happy to help when I can!
Getting this error when trying to install simba. Have also tried downgrading pip and received a different error regarding the dependencies.
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [81 lines of output] C:\Users\salinsky\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for shap Running setup.py clean for shap Failed to build shap ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (shap) A clear and concise description of what the bug is.
Desktop (please complete the following information):
Additional context plz help me