Closed omidm7 closed 5 years ago
@omidm7 Did you run the pip install command during the installation?
@epnev Yes!
Hi, So what are you running right now that's doing the caiman import, and where are you running it from?
Hey. I'm running demo_pipeline_cnmfE.py on Spyder (Python 3.6).
Sounds good; what's the path to that script when you're running it, and from what directory are you launching Spyder?
The script is in the path: /Users/omid/CaImAn/demos/general. And I am launching Spyder from the anaconda caiman environment I created. I got the whole thing to work on my laptop, but can't get it to run on the desktop. Both are iOS, python 3.6.
Maybe oasis didn't properly compile. Can you check whether there is a file oasis.cpython-36m-darwin.so (or a similarly named *.so file) in directory caiman/source_extraction/cnmf/?
Hi, I don't see any .so files in that directory.
Hi, So after you install caiman with pip, you will want to use the caimanmanager.py script to make a working directory, and then use that working directory rather than working in the sources.
You can create the oasis.so file by running python setup.py build_ext -i
within the CaImAn directory.
@pgunn , even when I run the caimanmanager.py script by itself, I get the oasis error.
Copy that script out of the caiman directory and then launch/run it from there. It can't run correctly out of the source dir.
@j-friedrich , that line gives me the following error:
you have to change to the CaImAn directory, there is the setup.py
@pgunn , No matter where I copy and paste that caimanmanager.py file, and whichever directory I use to open it, I still get the oasis error.
@j-friedrich , That seems to have fixed it.
Thank you both very much for your time, it is much appreciated! Omid
Hi everyone, I'm getting the same cannot import oasis error. Even though I have imported it. from . import oasis ImportError: cannot import name 'oasis' from partially initialized module 'caiman.source_extraction.cnmf' (most likely due to a circular import) (C:\Users\Shreyasta\PycharmProjects\CaImAn\caiman\source_extraction\cnmf__init__.py)
What should I do?
@SensibleLife333 Hello, how did you install caiman?
(note that we can have this conversation much faster if you can pop on Gitter: https://gitter.im/agiovann/Constrained_NMF )
Hi Pat,
I installed CaImAn from https://linuxtut.com/en/be62cbf84161279e33af/
Regards, Shreyasta Samal
On Fri, Dec 31, 2021 at 10:16 PM Pat Gunn @.***> wrote:
@SensibleLife333 https://github.com/SensibleLife333 Hello, how did you install caiman?
(note that we can have this conversation much faster if you can pop on Gitter: https://gitter.im/agiovann/Constrained_NMF )
— Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/CaImAn/issues/435#issuecomment-1003452472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXCM4WU45NTTKTUIVR6NCIDUTYMRJANCNFSM4GR5I3SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Hi, I'm having the same issue as @SensibleLife333 , but cannot find the relevant thread on the gitter link. Could somebody help me out?
System: Apple M1, OS X Sequoia, Python 3.11
Error Reproduction:
git clone https://github.com/flatironinstitute/CaImAn.git
conda install -n base -c conda-forge mamba -y # install mamba in base environment
mamba create -n caiman -c conda-forge caiman -y # install caiman
conda activate caiman # activate virtual environment
caimanmanager install
Run the first cell in demo_online_cnmfE.ipynb
Error Trace:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 9
6 import numpy as np
7 from time import time
----> 9 import caiman as cm
10 from caiman.source_extraction import cnmf as cnmf
11 from caiman.motion_correction import MotionCorrect
File ~/CaImAn/caiman/__init__.py:4
1 #!/usr/bin/env python
3 import pkg_resources
----> 4 from caiman.base.movies import movie, load, load_movie_chain, _load_behavior, play_movie
5 from caiman.base.timeseries import concatenate
6 from caiman.cluster import start_server, stop_server
File ~/CaImAn/caiman/base/movies.py:36
34 import caiman.base.traces
35 import caiman.mmapping
---> 36 import caiman.summary_images
37 import caiman.utils.sbx_utils
38 import caiman.utils.visualization
File ~/CaImAn/caiman/summary_images.py:18
16 import caiman
17 import caiman.base.movies
---> 18 from caiman.source_extraction.cnmf.pre_processing import get_noise_fft
20 def max_correlation_image(Y, bin_size: int = 1000, eight_neighbours: bool = True, swap_dim: bool = True) -> np.ndarray:
21 """Computes the max-correlation image for the input dataset Y with bin_size
22
23 Args:
(...)
40 max correlation image
41 """
File ~/CaImAn/caiman/source_extraction/cnmf/__init__.py:12
10 from . import spatial
11 from . import temporal
---> 12 from . import oasis
13 from . import params
14 from . import online_cnmf
ImportError: cannot import name 'oasis' from partially initialized module 'caiman.source_extraction.cnmf' (most likely due to a circular import) (~/CaImAn/caiman/source_extraction/cnmf/__init__.py)
Attempted Solutions:
python setup.py build_ext -i
from project root directory, but was returned with
Traceback (most recent call last):
File "~/CaImAn/setup.py", line 7, in <module>
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
caiman
Conda env., but could not find it.Hello, The instructions you're following mix two different install methods; it's important you just pick one and stick with it.
I suggest removing your checkout of caiman (do not check it out) and just use the rest of the instructions you have. See if it changes the results. If you still encounter issues, please open a new issue so we don't notify everyone else on this issue.
Cheers, Pat
Operating system: macOS, Python version (3.6), and working environment (Spyder)
Hello, after upgrading Caiman and running caimanmanager.py install in the terminal, I see a file directory 'Caiman' with the file caimanmanager.py in it and another directory called "Caiman data" as described in the installation instructions. However, I get the following error upon trying to import caiman:
Copy error log below Traceback (most recent call last):
File "", line 30, in
import caiman as cm
File "/Users/Bing/CaImAn/caiman/init.py", line 3, in
from .base.movies import movie, load, load_movie_chain
File "/Users/Bing/CaImAn/caiman/base/movies.py", line 67, in
from ..utils import visualization
File "/Users/Bing/CaImAn/caiman/utils/visualization.py", line 34, in
from ..summary_images import local_correlations
File "/Users/Bing/CaImAn/caiman/summary_images.py", line 31, in
from caiman.source_extraction.cnmf.pre_processing import get_noise_fft
File "/Users/Bing/CaImAn/caiman/source_extraction/cnmf/init.py", line 12, in
from . import oasis
ImportError: cannot import name 'oasis'
In a previous topic I saw the suggestion to remove caimanmanager.py from the Caiman folder and try running it there. I tried this and still receive the error.
Thanks for your help!