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

[Bug]: Pycharm cannot use causalnex #210

Open
1 task done
PhilrainV opened this issue Aug 10, 2023 · 1 comment
Open
1 task done

[Bug]: Pycharm cannot use causalnex #210

PhilrainV opened this issue Aug 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@PhilrainV
Copy link

Contact Details

[email protected]

Short description of the problem here.

Pycharm encountered “ ModuleNotFoundError:No module named 'causalnex. structure'; ' Causalnex 'is not a package” while “from causalnex.structure import StructureModel“.

CausalNex Version

0.12.0

Python Version

3.8

Relevant code snippet

import warnings
from causalnex.structure import StructureModel

warnings.filterwarnings("ignore")  # silence warnings

sm = StructureModel()

Relevant log output

D:\CODE_env\Anaconda\anaconda3\envs\CSN\python.exe D:\Project\NeurIPS2024\XX\causalnex.py 
Traceback (most recent call last):
  File "D:\Project\NeurIPS2024\XX\causalnex.py", line 36, in <module>
    from causalnex.structure import StructureModel
  File "D:\Project\NeurIPS2024\XX\causalnex.py", line 36, in <module>
    from causalnex.structure import StructureModel
ModuleNotFoundError: No module named 'causalnex.structure'; 'causalnex' is not a package

Code of Conduct

  • I agree to follow this project's Code of Conduct
@PhilrainV PhilrainV added the bug Something isn't working label Aug 10, 2023
@ngkaching
Copy link

Your filename causalnex.py is in conflict with the Package name. Change your file to another name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants