【python】Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问等系列问题及解决方法

Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问等系列问题

起初是想对python里面matplotlib进行下载

方法一
Win+R输入cmd进入到CMD窗口下,执行python -m pip install -U pip setuptools进行升级。
方法一配置代码截图

在这里插入图片描述

方法二
在Anaconda文件路径下执行pip install -U pip setuptools进行配置。
方法二配置代码截图

在这里插入图片描述

这里就出现了Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问问题

  • 这里就要使用 ’ --user ’ 权限去进行下载
  • 重新在Anaconda里打上pip install -U pip setuptools --user出现了Script file ‘E:\Anaconda\Scripts\pip-script.py’ is not present.问题
  • 这个是因为上面的upgrade操作已经把我的pip中的包或者是pip直接删掉了
    在这里插入图片描述
解决方法
使用 easy_install pip
这个命令,重新安装一下pip就好了
解决方法配置代码截图

在这里插入图片描述

接下来就开始解决python里面matplotlib进行下载安装问题
解决代码截图

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Gyangxixi/article/details/113778578