python 模块 chardet下载及介绍
1、pytcharm中报错
Traceback (most recent call last): File "C:/Users/ArcerZhang/Documents/Python/MyProjects/路飞学城-Python21天入门必备/第三章节 Python文件操作、函数、装饰器/71-文件处理-智能检测编码的工具.py", line 1, inimport chardet ModuleNotFoundError: No module named 'chardet' Process finished with exit code 1
2、安装第三方类库
C:\Users\ArcerZhang>cd C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts>dir 驱动器 C 中的卷是 Windows7_OS 卷的序列号是 5888-40CA C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts 的目录 2017/12/14 15:04. 2017/12/14 15:04 .. 2017/12/14 15:04 89,499 easy_install-3.6.exe 2017/12/14 15:04 89,499 easy_install.exe 2017/12/14 15:04 89,471 pip.exe 2017/12/14 15:04 89,471 pip3.6.exe 2017/12/14 15:04 89,471 pip3.exe 5 个文件 447,411 字节 2 个目录 124,068,610,048 可用字节 C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts>pip3.6.exe install chardet Collecting chardet Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 699kB/s Installing collected packages: chardet Successfully installed chardet-3.0.4 You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts>
3、 升级pip程序
C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts>python -m pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 202kB/s Installing collected packages: pip Found existing installation: pip 9.0.1 Uninstalling pip-9.0.1: Successfully uninstalled pip-9.0.1 Successfully installed pip-10.0.1 C:\Users\ArcerZhang\AppData\Local\Programs\Python\Python36-32\Scripts>