0
点赞
收藏
分享

微信扫一扫

【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进行升级。

方法一配置代码截图

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

方法二

在Anaconda文件路径下执行pip install -U pip setuptools进行配置。

方法二配置代码截图

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

这里就出现了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直接删掉了
  • 【python】Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问等系列问题及解决方法_python_03

解决方法

使用 easy_install pip
这个命令,重新安装一下pip就好了

解决方法配置代码截图

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

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

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


举报

相关推荐

0 条评论