CaImAn
CaImAn copied to clipboard
caimanmanager.py install fail
For better support, please use the template below to submit your issue. When your issue gets resolved please remember to close it.
Sometimes errors while running CNMF occur during parallel processing which prevents the log to provide a meaningful error message. Please reproduce your error with setting dview=None
.
If you need to upgrade CaImAn follow the instructions given in the documentation.
- Tell us a bit about your setup:
-
Operating system (Linux/macOS/Windows): Windows 10
-
Python version (3.x): 3.9.7
-
Working environment (Python IDE/Jupyter Notebook/other): conda
-
Which of the demo scripts you're using for your analysis (if applicable):
-
CaImAn version*: recent
-
CaImAn installation process (
pip install .
/pip install -e .
/conda): conda *You can get the CaImAn version by creating aparams
object and then typingparams.data['caiman_version']
. If the field doesn't exist, type N/A and consider upgrading)
-
Describe the issue that you are experiencing trying to install caimanmanager.py and not working. Used the instructions provided in the readme and did not work. Used the following as well and still did not unpack...also was looking for caimanmanager.py in the wrong directory...it is here: C:\Users\scott\anaconda3\envs\mesmerize-core\bin
-
Copy error log below
import sysconfig sysconfig.get_path('scripts') 'C:\Users\scott\anaconda3\envs\mesmerize-core\Scripts' python 'C:\Users\scott\anaconda3\envs\mesmerize-core\Scripts\caimanmanager.py' install
- If you're not reporting an error, type your message below
Hello, Can you provide the error message when the instructions first don't work?
C:\Users\scott\anaconda3\envs\mesmerize-core\python.exe: can't open file 'C:\Users\scott\anaconda3\envs\mesmerize-core\Scripts\caimanmanager.py': [Errno 2] No such file or directory
which makes sense because the caimanmanager.py file is not in that directory
I found a work around but wanted to let you know
is this a bug in the demo_motion_correction notebook? Last block of the notebbook...the file is in the directory and exists
**FileNotFoundError Traceback (most recent call last) Cell In [19], line 7 5 plt.figure(figsize = (20,10)) 6 for cnt, fl, metr in zip(range(len(fls)),fls,['pw_rigid','rigid','raw']): ----> 7 with np.load(fl) as ld: 8 print(ld.keys()) 9 print(fl)
File ~\anaconda3\envs\mesmerize-core\lib\site-packages\numpy\lib\npyio.py:417, in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 415 own_fid = False 416 else: --> 417 fid = stack.enter_context(open(os_fspath(file), "rb")) 418 own_fid = True 420 # Code to distinguish from NumPy binary files and pickles.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\scott\caiman_data\example_movies\Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_._metrics.npz'**
Can you cut'n'paste that filename as carefully as you can and do a dir FILENAME
? Perhaps there's some very subtle filename difference between what's there and what the code is looking for.
ah there are two of them...let me remove one and see if it works
dir('C:\Users\scott\caiman_data\example_movies\Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_._metrics.npz')
output: ['add', 'class', 'contains', 'delattr', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
still same error
Hello, Sorry, I wasn't clear, please don't use the dir() function; use the dir command from the command prompt.
(base) C:\Users\scott>dir C:\Users\scott\caiman_data\example_movies\Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_._metrics.npz 'dir' is not recognized as an internal or external command, operable program or batch file.
is that what you mean? sorry I am still new to python
That is what I meant, and I am puzzled that you seem to be running on windows but the "dir" command doesn't seem to be working for you. Let's do this instead (do this from your python shell):
import glob
glob.glob('C:/Users/scott/caiman_data/example_movies/Sue*')
glob.glob('C:/Users/scott/caiman_data/example_movies/Sue*') ['C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46.tif', 'C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_.mmap', 'C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000__metrics.npz', 'C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46_metrics.npz', 'C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46_rig__d1_170_d2_170_d3_1_order_F_frames_3000_.mmap', 'C:/Users/scott/caiman_data/example_movies\Sue_2x_3000_40_-46_rig__d1_170_d2_170_d3_1_order_F_frames_3000__metrics.npz']
It looks like something's up with the code to generate filenames that's causing things to not line up correctly; these two don't match:
Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_.mmap
Sue_2x_3000_40_-46_els__d1_170_d2_170_d3_1_order_F_frames_3000_._metrics.npz
I'll try to reproduce the issue locally and get back to you as soon as I have an answer. Sorry for the inconvenience.
okie doke, thanks
I have reproduced the issue on my workstation and am working on a fix.
thanks!
Just following up on this: it seems the original caimanmanager.py
issue is resolved, and the issue is with file wrangling in the motion correction demo notebook?
The mcorr file naming stuff was fixed, I had to update mesmerize-core for it as well a few months ago.
pretty sure it was this release: https://github.com/flatironinstitute/CaImAn/releases/tag/v1.9.12
Ok I'll close please let me know if there are objections and I'll re-open. :)