You are using pip version 10.0.1, however version 18.0 is available.

C:\Users\yaosht>pip install requests
Collecting requests
  Using cached https://files.pythonhosted.org/packages/ff/17/5cbb026005115301a8fb2f9b0e3e8d32313142fe8b617070e7baad20554f/requests-2.20.1-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests)
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
  Using cached https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests)
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: idna, certifi, urllib3, chardet, requests
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files\\python37\\Lib\\site-packages\\idna'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

执行信息中提示的命令 

python -m pip install --upgrade pip

还是有问题,如下图,又增加一个user选项 

python -m pip install --user --upgrade pip

运行之后还是有问题,就指定了pip版本

python -m pip install --user --upgrade pip==18.1

 安装成功后,开始安装第三方的包,request

pip install request

 又报如下图的似乎权限的事,就加了--user选项

pip install --user request

执行之后成功安装 

顺手就把爬虫需要的其他包,如openpyxl,lxml,pandas包也下载下来 

 

之后在我的eclipse中就可以看到

 

猜你喜欢

转载自blog.csdn.net/ystyaoshengting/article/details/84863101
今日推荐