[Bug]: Pycharm cannot use causalnex
PhilrainV opened this issue · comments
Philrain commented
Contact Details
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
ngkaching commented
Your filename causalnex.py
is in conflict with the Package name. Change your file to another name.