学习AI需要安装sklearn,安装不停报失败,需要安装几个前置的库numpy,scipy,joblib。搜索网上的文章大都不全,摸索了一天,最终成功了,用的是清华的镜像,以下是操作日志:
D:\ceshi\python\kmeans>pip install joblib -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting joblib
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/10/40/d551139c85db202f1f384ba8bcf96aca2f329440a844f924c8a0040b6d02/joblib-1.3.2-py3-none-any.wh
l (302 kB)
---------------------------------------- 302.2/302.2 kB 2.7 MB/s eta 0:00:00
Installing collected packages: joblib
Successfully installed joblib-1.3.2
D:\ceshi\python\kmeans>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple skearn
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement skearn (from versions: none)
ERROR: No matching distribution found for skearn
D:\ceshi\python\kmeans>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scikit-learn
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting scikit-learn
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8e/45/1d6c34f0a4db820968e35ca872e2a553f4d1015e7437f04128496c046034/scikit_learn-1.3.1-cp38-cp38
-win_amd64.whl (9.3 MB)
---------------------------------------- 9.3/9.3 MB 11.2 MB/s eta 0:00:00
Requirement already satisfied: numpy<2.0,>=1.17.3 in c:\users\zhangdanning\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn)
(1.24.4)
Requirement already satisfied: scipy>=1.5.0 in c:\users\zhangdanning\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.10.
1)
Requirement already satisfied: joblib>=1.1.1 in c:\users\zhangdanning\appdata\local\programs\python\python38\lib\site-packages (from scikit-learn) (1.3.
2)
Collecting threadpoolctl>=2.0.0 (from scikit-learn)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/81/12/fd4dea011af9d69e1cad05c75f3f7202cdcbeac9b712eea58ca779a72865/threadpoolctl-3.2.0-py3-none
-any.whl (15 kB)
Installing collected packages: threadpoolctl, scikit-learn
Successfully installed scikit-learn-1.3.1 threadpoolctl-3.2.0