Skip to content
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

ImportError: Cannot Import Name 'formats' After Installing pycortex on Linux #535

Open
seungju9810 opened this issue May 1, 2024 · 1 comment

Comments

@seungju9810
Copy link

Hello, I am a graduate student studying neuroscience. Thank you for developing the excellent tool, Pycortex.

I installed Pycortex on a Linux server, and when I tried importing cortex, I encountered the following error.
ImportError: cannot import name 'formats' from partially initialized module 'cortex' (most likely due to a circular import) (~/pycortex/cortex/init.py)
Pycortex error

I haven't modified anything after installing Pycortex, so I am unsure what could be causing this issue.
I would greatly appreciate any guidance on how to resolve this error. Thank you in advance for your help!

@mvdoc
Copy link
Contributor

mvdoc commented May 1, 2024

Hi @seungju9810,

Make sure to run your ipython session from a different directory than the directory with the pycortex git repository. Otherwise python will try to import the modules from the git repository (in ~/SpeechDecoding/pycortex), rather than from the correct directory containing all installed packages for your python environment.

If that doesn't solve the problem, make sure to install Pycortex from pypi with python -m pip install pycortex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants