python3.7安装pandas库遇到问题的解决方案
1.问题描述:
ERROR: Could not find a version that satisfies the requirement pytz>=2017.2 (from pandas) (from versions: none)
ERROR: No matching distribution found for pytz>=2017.2 (from pandas)
出现类似的问题,原因是:无法连接到Python库,因为pip和conda的安装都是默认国外站点,需要通过配置国内镜像才能正确安装
2.解决方案:
首先配置国内镜像:
D:\python3>pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
然后,重新pip install pandas
D:\python3>pip install pandas
最后,可以去取消镜像设置:
D:\python3>pip config unset global.index-url