当我们需要安装一些必要的库文件,例如:cv2,tkinter等,会遇到许多问题
所有的库文件都可以类比以下方法去下载
安装方法:
打开命令输入行,输入:
pip install cv2
pip install tkinter
即可安装。
但是由于网络环境问题出现:
ERROR: Could not find a version that satisfies the requirement erfasefas (from versions: none)
ERROR: No matching distribution found for erfasefas
遇到这样的问题就需要使用镜像网站去下载,在cmd(命令提示行)中输入:
pip install 包名 -i 网站名 --trusted-host 网站名
网站有以下可用:
上海交通大学:http://ftp.sjtu.edu.cn/html/resources.xml(部分移动运营商出口状况不佳,无法访问)
华中科技大学: