-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'caiman' #1019
Comments
Hello, If you can use the terminal to activate your caiman environment, then bring up a python interactive shell (by typing just "python" from the command prompt), and then do "import caiman", what happens? |
Thank you so much for the fast response! (base) PS C:> conda activate caiman
I have made sure that NumPy and SciPy are upgraded as well |
Hello, What we saw above was a warning; if that's all you got then caiman presumably imported successfully from that commandline and we just need to figure out why it wasn't loaded when you were trying to run the demo? |
Where would I need to go to find any information to help figure out where the error is deriving from? |
I suggest: |
@ambtetl seems like you're using the mesmerize desktop app, this is the repo for that: https:/kushalkolar/MESmerize Also BTW we don't recommend the desktop app anymore, it's been superseeded by Anyways, I'm guessing you probably haven't set the "pre-run" commands in the system config, you need to specify the environment there: http://docs.mesmerizelab.org/en/master/user_guides/general/misc.html#systemconfiguration |
@pgunn Now when I run, I am not receiving any messages after import caiman |
Would it then be easier to uninstall and install mesmerize-core? |
@ambtetl yes I'd recommend |
@kushalkolar I am trying to install before the end of the week to be able to work remotely, so if possible I would like to try to get this running asap. Again, my apologies for my questions as a very novice user. I greatly appreciate all of you help so far! I have attempted to install mesmerize-core using the install instructions under the conda section of https:/nel-lab/mesmerize-core. To launch "mesmerize-core" should be used instead of "mesmerize", correct? When I run (base) PS C:\CaImAn> caimanmanager.py install I do not get any messages or errors, and my windows terminal briefly opens and closes. Then whenever I try to run ipython to verify mesmerize_core is installed I get the following message In [1]: import mesmerize_core^M
|
Did you install the conda package from conda-forge?
…On Thu, Nov 17, 2022, 13:01 ambtetl ***@***.***> wrote:
@kushalkolar <https:/kushalkolar> I am trying to install
before the end of the week to be able to work remotely, so if possible I
would like to try to get this running asap. Again, my apologies for my
questions as a very novice user. I greatly appreciate all of you help so
far! I have attempted to install mesmerize-core using the install
instructions under the conda section of
https:/nel-lab/mesmerize-core. To launch "mesmerize-core"
should be used instead of "mesmerize", correct? When I run (base) PS
C:\CaImAn> caimanmanager.py install I do not get any messages or errors,
and my windows terminal briefly opens and closes. Then whenever I try to
run ipython to verify mesmerize_core is installed I get the following
message
In [1]: import mesmerize_core^M
...: mesmerize_core.*version*
ImportError Traceback (most recent call last)
Cell In [1], line 1
----> 1 import mesmerize_core
2 mesmerize_core.*version*
File ~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core_
*init*_.py:1
----> 1 from .batch_utils import (
2 set_parent_raw_data_path,
3 get_parent_raw_data_path,
4 load_batch,
5 create_batch,
6 )
7 from .caiman_extensions import *
8 from pathlib import Path
File
~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core\batch_utils.py:7
3 from typing import Union
5 import pandas as pd
----> 7 from .algorithms import cnmf, mcorr
8 from .algorithms import cnmfe
9 from .utils import validate_path
File
~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core\algorithms\cnmf.py:3
1 """Performs CNMF in a separate process"""
2 import click
----> 3 import caiman as cm
4 from caiman.source_extraction.cnmf import cnmf as cnmf
5 from caiman.source_extraction.cnmf.params import CNMFParams
File C:\CaImAn\caiman_*init*_.py:4
1 #!/usr/bin/env python
3 import pkg_resources
----> 4 from .base.movies import movie, load, load_movie_chain,
_load_behavior
5 from .base.timeseries import concatenate
6 from .cluster import start_server, stop_server
File C:\CaImAn\caiman\base\movies.py:59
56 from .traces import trace
58 from ..mmapping import load_memmap
---> 59 from ..utils import visualization
60 from .. import summary_images as si
61 from ..motion_correction import apply_shift_online,
motion_correct_online
File C:\CaImAn\caiman\utils\visualization.py:37
34 import functools as fct
36 from ..base.rois import com
---> 37 from ..summary_images import local_correlations
39 try:
40 cv2.setNumThreads(0)
File C:\CaImAn\caiman\summary_images.py:23
20 from typing import Any, List, Optional, Tuple
22 import caiman as cm
---> 23 from caiman.source_extraction.cnmf.pre_processing import
get_noise_fft
24 from caiman.source_extraction.cnmf.utilities import get_file_size
26 def max_correlation_image(Y, bin_size: int = 1000, eight_neighbours:
bool = True, swap_dim: bool = True) -> np.ndarray:
File C:\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)
(C:\CaImAn\caiman\source_extraction\cnmf_*init*_.py)
In [2]:
—
Reply to this email directly, view it on GitHub
<#1019 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/ACHXXRCNQSQ7NKYM5WKDV5TWIZXF7ANCNFSM6AAAAAASCO3CNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, I did.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 1:39 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module named 'caiman' (Issue #1019)
[EXTERNAL]
Did you install the conda package from conda-forge?
On Thu, Nov 17, 2022, 13:01 ambtetl ***@***.***> wrote:
@kushalkolar <https:/kushalkolar> I am trying to install
before the end of the week to be able to work remotely, so if possible I
would like to try to get this running asap. Again, my apologies for my
questions as a very novice user. I greatly appreciate all of you help so
far! I have attempted to install mesmerize-core using the install
instructions under the conda section of
https:/nel-lab/mesmerize-core. To launch "mesmerize-core"
should be used instead of "mesmerize", correct? When I run (base) PS
C:\CaImAn> caimanmanager.py install I do not get any messages or errors,
and my windows terminal briefly opens and closes. Then whenever I try to
run ipython to verify mesmerize_core is installed I get the following
message
In [1]: import mesmerize_core^M
...: mesmerize_core.*version*
ImportError Traceback (most recent call last)
Cell In [1], line 1
----> 1 import mesmerize_core
2 mesmerize_core.*version*
File ~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core_
*init*_.py:1
----> 1 from .batch_utils import (
2 set_parent_raw_data_path,
3 get_parent_raw_data_path,
4 load_batch,
5 create_batch,
6 )
7 from .caiman_extensions import *
8 from pathlib import Path
File
~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core\batch_utils.py:7
3 from typing import Union
5 import pandas as pd
----> 7 from .algorithms import cnmf, mcorr
8 from .algorithms import cnmfe
9 from .utils import validate_path
File
~\Anaconda3\envs\mesmerize-core\lib\site-packages\mesmerize_core\algorithms\cnmf.py:3
1 """Performs CNMF in a separate process"""
2 import click
----> 3 import caiman as cm
4 from caiman.source_extraction.cnmf import cnmf as cnmf
5 from caiman.source_extraction.cnmf.params import CNMFParams
File C:\CaImAn\caiman_*init*_.py:4
1 #!/usr/bin/env python
3 import pkg_resources
----> 4 from .base.movies import movie, load, load_movie_chain,
_load_behavior
5 from .base.timeseries import concatenate
6 from .cluster import start_server, stop_server
File C:\CaImAn\caiman\base\movies.py:59
56 from .traces import trace
58 from ..mmapping import load_memmap
---> 59 from ..utils import visualization
60 from .. import summary_images as si
61 from ..motion_correction import apply_shift_online,
motion_correct_online
File C:\CaImAn\caiman\utils\visualization.py:37
34 import functools as fct
36 from ..base.rois import com
---> 37 from ..summary_images import local_correlations
39 try:
40 cv2.setNumThreads(0)
File C:\CaImAn\caiman\summary_images.py:23
20 from typing import Any, List, Optional, Tuple
22 import caiman as cm
---> 23 from caiman.source_extraction.cnmf.pre_processing import
get_noise_fft
24 from caiman.source_extraction.cnmf.utilities import get_file_size
26 def max_correlation_image(Y, bin_size: int = 1000, eight_neighbours:
bool = True, swap_dim: bool = True) -> np.ndarray:
File C:\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)
(C:\CaImAn\caiman\source_extraction\cnmf_*init*_.py)
In [2]:
—
Reply to this email directly, view it on GitHub
<#1019 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/ACHXXRCNQSQ7NKYM5WKDV5TWIZXF7ANCNFSM6AAAAAASCO3CNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319049714__;Iw!!MXfaZl3l!eajlojM8evjUd7zbtM5DecMlzqiIwWnuwZj-ncn-v_yUQgwfPeEOrJ8AKTmQgcl6N_bhWe4_E_GvZ09LTpVfbUfNmsH-JH4$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAUHHCR2CYNXYHECCOTWIZ3SNANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!eajlojM8evjUd7zbtM5DecMlzqiIwWnuwZj-ncn-v_yUQgwfPeEOrJ8AKTmQgcl6N_bhWe4_E_GvZ09LTpVfbUfNVkrSa1s$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
It seems like it's referring to a caiman dir outside your anaconda path. Did you manually set your PYTHONPATH env variable? |
Another possibility is trying to import caiman from inside a source checkout, which people should avoid. |
@kushalkolar This is what is currently in the system properties, without me manually setting the PYTHONPATH env variable. If I have to modify is should the value be the location for the env folder? |
Did you also try to move outside the caiman source dir as Pat suggested? |
I am sorry but I am not exactly sure how to proceed with this.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 4:07 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module named 'caiman' (Issue #1019)
[EXTERNAL]
Did you also try to move outside the caiman source dir as Pat suggested?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319201718__;Iw!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRidQQUfHo$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAQIDFPRGHUCCRCG4A3WI2NALANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRitgU3Kqk$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
How exactly are you launching the jupyter notebook for running the
mesmerize-core demo?
…On Thu, Nov 17, 2022, 16:16 ambtetl ***@***.***> wrote:
I am sorry but I am not exactly sure how to proceed with this.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 4:07 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module
named 'caiman' (Issue #1019)
[EXTERNAL]
Did you also try to move outside the caiman source dir as Pat suggested?
—
Reply to this email directly, view it on GitHub<
https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319201718__;Iw!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRidQQUfHo$>,
or unsubscribe<
https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAQIDFPRGHUCCRCG4A3WI2NALANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRitgU3Kqk$>.
You are receiving this because you were mentioned.Message ID:
***@***.******@***.***>>
—
Reply to this email directly, view it on GitHub
<#1019 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/ACHXXRH4575Q7SBV5JTBRHLWI2ODRANCNFSM6AAAAAASCO3CNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Since I have uninstalled and reinstalled I have only ran the code in the install directions from github.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 4:48 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module named 'caiman' (Issue #1019)
[EXTERNAL]
How exactly are you launching the jupyter notebook for running the
mesmerize-core demo?
On Thu, Nov 17, 2022, 16:16 ambtetl ***@***.***> wrote:
I am sorry but I am not exactly sure how to proceed with this.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 4:07 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module
named 'caiman' (Issue #1019)
[EXTERNAL]
Did you also try to move outside the caiman source dir as Pat suggested?
—
Reply to this email directly, view it on GitHub<
https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319201718__;Iw!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRidQQUfHo$>,
or unsubscribe<
https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAQIDFPRGHUCCRCG4A3WI2NALANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!cWJeUVBRquv-TbjUiDu1GxrUhVs8lApYUNYEKkSCllHzo9-DqP28lS_2KzoOfDUXUAzjSsbLhba1548HFTY-xyRitgU3Kqk$>.
You are receiving this because you were mentioned.Message ID:
***@***.******@***.***>>
—
Reply to this email directly, view it on GitHub
<#1019 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/ACHXXRH4575Q7SBV5JTBRHLWI2ODRANCNFSM6AAAAAASCO3CNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319250447__;Iw!!MXfaZl3l!ZlulsKhNvNnMngtSapfwAXVUZeDG2Uh7Q427kAtK3G3ep0sL5YUebKSRboEoRcFaCMAEUpErFvdhGzi-Eeu26RrcWnyEIEs$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAWUQ3RUMLYW56E6Q4DWI2RXTANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!ZlulsKhNvNnMngtSapfwAXVUZeDG2Uh7Q427kAtK3G3ep0sL5YUebKSRboEoRcFaCMAEUpErFvdhGzi-Eeu26Rrc1Q6z3PQ$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I mean how are you launching the jupyter notebook after installation |
I have only been launching the powershell prompt from the Anaconda 3 folder from the initial Anaconda download. Currently for this download I have received errors, I have not proceeded. For the prior download, I only used the powershell to launch mesmerize and just worked in the project browser.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 5:13 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module named 'caiman' (Issue #1019)
[EXTERNAL]
I mean how are you launching the jupyter notebook after installation
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319276092__;Iw!!MXfaZl3l!bV0CXE20uGCyn9wPmPdaLoFLj2tbs0rzckQStbenZYhmE_OMT1Q3SQlWLCdMVVpIGnPHEnWjs-9ezDdsGP7pNFdwzE93iXw$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAS7GFFIQHWMXT664Z3WI2UXFANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!bV0CXE20uGCyn9wPmPdaLoFLj2tbs0rzckQStbenZYhmE_OMT1Q3SQlWLCdMVVpIGnPHEnWjs-9ezDdsGP7pNFdwkvgj7_g$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
From your email it seems like you're at NYU? I know someone there who can
help, if you email me I can get you in touch.
…On Thu, Nov 17, 2022 at 5:43 PM ambtetl ***@***.***> wrote:
I have only been launching the powershell prompt from the Anaconda 3
folder from the initial Anaconda download. Currently for this download I
have received errors, I have not proceeded. For the prior download, I only
used the powershell to launch mesmerize and just worked in the project
browser.
From: Kushal Kolar ***@***.***>
Sent: Thursday, November 17, 2022 5:13 PM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Tetlow, Amber ***@***.***>; Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] ModuleNotFoundError: No module
named 'caiman' (Issue #1019)
[EXTERNAL]
I mean how are you launching the jupyter notebook after installation
—
Reply to this email directly, view it on GitHub<
https://urldefense.com/v3/__https:/github.com/flatironinstitute/CaImAn/issues/1019*issuecomment-1319276092__;Iw!!MXfaZl3l!bV0CXE20uGCyn9wPmPdaLoFLj2tbs0rzckQStbenZYhmE_OMT1Q3SQlWLCdMVVpIGnPHEnWjs-9ezDdsGP7pNFdwzE93iXw$>,
or unsubscribe<
https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4CVBAS7GFFIQHWMXT664Z3WI2UXFANCNFSM6AAAAAASCO3CNM__;!!MXfaZl3l!bV0CXE20uGCyn9wPmPdaLoFLj2tbs0rzckQStbenZYhmE_OMT1Q3SQlWLCdMVVpIGnPHEnWjs-9ezDdsGP7pNFdwkvgj7_g$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#1019 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/ACHXXRA7QSUUJQOLR5GWQJ3WI2YIPANCNFSM6AAAAAASCO3CNM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closing issue due to lack of activity. @ambtetl please let me know if this was a mistake. |
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.
Operating system (Linux/macOS/Windows):
Windows
Python version (3.x):
Python 3.10.6
Working environment (Python IDE/Jupyter Notebook/other):
Python IDE I believe
Which of the demo scripts you're using for your analysis (if applicable):
CaImAn version*:
CaImAn1.8.8
CaImAn installation process (
pip install .
/pip install -e .
/conda):pip install -e I believe.
*You can get the CaImAn version by creating a
params
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
My apologies but I am very new to Python. So I am sure I am possibly missing something very obvious, but I have not been able to resolve this issue. I have already installed Caiman but when I go to run batch manager I receive the following error.
Copy error log below
Traceback (most recent call last):
File "C:\Users\tetloa01\Anaconda3\envs\mesmerize\lib\site-packages\mesmerize\viewer\modules\batch_run_modules\caiman_motion_correction.py", line 23, in
import caiman as cm
ModuleNotFoundError: No module named 'caiman'
If you're not reporting an error, type your message below
The text was updated successfully, but these errors were encountered: