当我们要使用Python操纵Excel表格的时候我们需要准备许多的包,下面是操纵Excel表格用到的包:
1.openpyxl 主要用于读写xlsx格式
2.xlrd
3.future
4.xlwt-future
5.pyexcel-io
6.ordereddict
7.pyexcel
8.pyexcel-xls
平常我们都是通过pip的方式来获取项目所需要的包,今天我在写项目操纵Excel表格的时候,也是像往常一下导入所需要的包,以下是导入包的命令:
pip install openpyxl
但是出现了以下问题:
出现这一问题的原因是pip默认的资源下载路径出现了问题,需要换源下载,我所切换的资源是清华大学提供的下载资源,网址为
https://mirrors.ustc.edu.cn/pypi/web/simple/ 具体命令为:
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ openpyxl
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ xlrd
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ future
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ xlwt-future
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ pyexcel-io
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ ordereddict
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ pyexcel
pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/ pyexcel-xls
这样问题就可以解决了。