Python3(6):Python如何安装requests,openpyxl,xlrd,pyecharts

Python如何安装requests,openpyxl,数据包pyecharts

一,安装requests

  1. 打开cmd.exe
  2. 进入python目录的Scripts中
    C:\Users\fenfen>cd C:\Program Files\Python\Python36\Scripts
  3. 使用命令安装requests,命令:pip install requests
    C:\Program Files\Python\Python36\Scripts>pip install requests
    提示:
    PermissionError: [WinError 5] 拒绝访问。: 'c:\\program files\\python\\python36\\Lib\\site-packages\\chardet'
    解决方案:没有权限,那么cmd.exe需要用管理员身份打开(进入C:\Windows\System32目录,右键点击cmd.exe,以管理员身份打开),然后重复执行:1-3的操作。
  4. 安装成功,如图
    Successfully installed certifi-2019.11.28 chardet-3.0.4 idna-2.8 requests-2.22.0

Python3(6):Python如何安装requests,openpyxl,xlrd,pyecharts_第1张图片

二,安装openpyxl

命令:pip install openpyxl

安装成功,如图

Successfully installed et-xmlfile-1.0.1 jdcal-1.4.1 openpyxl-3.0.3

Python3(6):Python如何安装requests,openpyxl,xlrd,pyecharts_第2张图片​​​

三,安装xlrd
命令:pip install  xlrd
执行结果:
C:\Program Files\Python\Python36\Scripts>pip install xlrd
Collecting xlrd
  Downloading https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl (103kB)
    100% |████████████████████████████████| 112kB 6.2kB/s
Installing collected packages: xlrd
Successfully installed xlrd-1.2.0

 

二,安装数据包

安装pyechartsecharts-china-provinces-pypkgecharts-china-cities-pypkg

 

命令:pip install pyecharts

 

命令:pip install echarts-china-provinces-pypkg

命令:pip --default-timeout=150 install echarts-china-cities-pypkg

 

你可能感兴趣的:(python相关)