在命令窗口执行pip install sklearn时遇到了以下问题:
问题1:安装的是sklearn 0.0post1,程序运行不了
解决方案:把sklearn改为scikit-learn
问题2、 Could not find a version that satisfies the requirement scikit-learn (from versions: none)
![](https://img-blog.csdnimg.cn/img_convert/71732501626109fc53b60a4f0f491d92.png)
原因:查了下,可能是网络问题,要使用国内的镜像源来解决,参考了这篇文章http://t.csdn.cn/5RQJ1(但仍然不行)
问题3:Read timed out
![](https://img-blog.csdnimg.cn/img_convert/d9b44500bf57e62eeb23140cd6bd0edd.png)
![](https://img-blog.csdnimg.cn/img_convert/8661bd2af1a5b292453e9614adeeeeeb.png)
解决:结合问题1参考的文章,以及这篇文章http://t.csdn.cn/SQDUO,最终解决了
解决方案:pip --default-timeout=100 install scikit-learn -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
成功安装截图:
![](https://img-blog.csdnimg.cn/img_convert/ecab1f5c9dd2c885d15b86e67c5e4cb7.png)