bnlearn
bnlearn copied to clipboard
Syntax Warning upon loading
after running "import bnlearn as bn", I get the following messages:
_invisible_codes = re.compile("\x1b\[\d*m") # ANSI color codes
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/extern/tabulate.py:257: SyntaxWarning: invalid escape sequence '\['
_invisible_codes_bytes = re.compile(b"\x1b\[\d*m") # ANSI color codes
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/models/MarkovNetwork.py:611: SyntaxWarning: invalid escape sequence '\p'
"""
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/models/MarkovNetwork.py:725: SyntaxWarning: invalid escape sequence '\s'
"""
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/models/FactorGraph.py:404: SyntaxWarning: invalid escape sequence '\s'
"""
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/models/SEM.py:624: SyntaxWarning: invalid escape sequence '\g'
"""
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/inference/ExactInference.py:763: SyntaxWarning: invalid escape sequence '\s'
"""
/home/Documents/python_code/bn_learn/.venv/lib/python3.13/site-packages/pgmpy/inference/mplp.py:101: SyntaxWarning: invalid escape sequence '\{'
Thank you for mentioning this issue! I created a hotfix because both pgmpy and joblib have some issues with Python 3.12 or higher.
Install the latest version with:
pip install -U bnlearn