How can I solve it? ImportError: cannot import name 'Log' from 'distutils.log'

Traceback (most recent call last):
File β€œ/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/”, line 556, in _run_script
exec(code, module.dict)
File β€œ/app/projetostreamlitamericanas/”, line 6, in
import sklearn
File β€œ/home/appuser/venv/lib/python3.9/site-packages/sklearn/”, line 82, in
from .base import clone
File β€œ/home/appuser/venv/lib/python3.9/site-packages/sklearn/”, line 17, in
from .utils import _IS_32BIT
File β€œ/home/appuser/venv/lib/python3.9/site-packages/sklearn/utils/”, line 29, in
from .fixes import parse_version, threadpool_info
File β€œ/home/appuser/venv/lib/python3.9/site-packages/sklearn/utils/”, line 19, in
import scipy.stats
File β€œ/home/appuser/venv/lib/python3.9/site-packages/scipy/stats/”, line 467, in
from ._stats_py import *
File β€œ/home/appuser/venv/lib/python3.9/site-packages/scipy/stats/”, line 37, in
from numpy.testing import suppress_warnings
File β€œ/home/appuser/venv/lib/python3.9/site-packages/numpy/testing/”, line 12, in
from ._private import extbuild, decorators as dec
File β€œ/home/appuser/venv/lib/python3.9/site-packages/numpy/testing/_private/”, line 11, in
from numpy.distutils.ccompiler import new_compiler
File β€œ/home/appuser/venv/lib/python3.9/site-packages/numpy/distutils/”, line 24, in
from . import ccompiler
File β€œ/home/appuser/venv/lib/python3.9/site-packages/numpy/distutils/”, line 20, in
from numpy.distutils import log
File β€œ/home/appuser/venv/lib/python3.9/site-packages/numpy/distutils/”, line 4, in
from distutils.log import Log as old_Log
ImportError: cannot import name β€˜Log’ from β€˜distutils.log’ (/home/appuser/venv/lib/python3.9/site-packages/setuptools/_distutils/

Hi there,

Thanks for sharing your question with the community! Check out our guidelines on how to post an effective question here – in particular, please edit your post to include a code snippet so we can reproduce the issue.