【Python配置】pandas包的安装和Could not find a version that satisfies the requirement pandas (from versions: none) ERROR: No matching distribution found for pandas的解决

首先我尝试了在cmd窗口运行:会出现Exception异常(爆出一堆红字)。后来考虑是权限问题,采用管理员身份开启cmd,以下任选一个命令输入:

pip install pandas
python -m pip install pandas

报错:ERROR: Could not find a version that satisfies the requirement pandas (from versions: none);ERROR: No matching distribution found for pandas

 由于我本机安装了python2和python3,pip在这时难以决断符合的版本,就连使用python -m指定当前版本依然不行,所以必须声明清楚是使用哪个解释器的pip:

执行:

py -3 -m pip install pandas

表示指定使用python3的pip,同理-2参数表示使用python2的pip。

如果下载过慢,可以换源:

py -3 -m pip install pandas -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

 出现Successfully installed的提示则说明安装成功。

猜你喜欢

转载自www.cnblogs.com/CSGO-416482145/p/12600131.html
今日推荐