[Python] Could not install packages due to an EnvironmentError: [WinError 5] Access denied and other series of problems and solutions

Could not install packages due to an EnvironmentError: [WinError 5] Access denied and other series of issues

At first I wanted to download matplotlib in python

method one
Win+R输入cmd进入到CMD窗口下,执行python -m pip install -U pip setuptools进行升级。
Method one configuration code screenshot

Insert picture description here

Method Two
在Anaconda文件路径下执行pip install -U pip setuptools进行配置。
Method two configuration code screenshot

Insert picture description here

Here appears Could not install packages due to an EnvironmentError: [WinError 5] Access denied

  • Here we will use the '--user' permission to download
  • Re-type pip install -U pip setuptools --user in Anaconda, and the Script file'E:\Anaconda\Scripts\pip-script.py' is not present.
  • This is because the upgrade operation above has directly deleted the package or pip in my pip
    Insert picture description here
Solution
使用 easy_install pip
这个命令,重新安装一下pip就好了
Solution configuration code screenshot

Insert picture description here

Next, start to solve the problem of downloading and installing matplotlib in python
Solve the code screenshot

Insert picture description here

Guess you like

Origin blog.csdn.net/Gyangxixi/article/details/113778578