一、问题现象:
1. 缺包:from imblearn.over_sampling import SMOTE ModuleNotFoundError: No module named 'imblearn'
2. 下载安装包:pip install -U imbalanced-learn
3. 安装时报错:
(1) 下载速度超级慢
(2) 报错“Traceback (most recent call last): File "e:\anaconda\lib\site-packages\pip-23.3.1-py3.7.egg\pip\_vendor\urllib3\r esponse.py", line 438, in _error_catcher yield File "e:\anaconda\lib\site-packages\pip-23.3.1-py3.7.egg\pip\_vendor\urllib3\r esponse.py", line 561, in read data = self._fp_read(amt) if not fp_closed else b"" File "e:\anaconda\lib\site-packages\pip-23.3.1-py3.7.egg\pip\_vendor\urllib3\r esponse.py", line 527, in _fp_read”
二、改进措施:
通过国内镜像下载安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple imbalanced-learn -U