一、pytcharm中報錯html
Traceback (most recent call last): File "C:/Users/ArcerZhang/Documents/Python/MyProjects/路飛學城-Python21天入門必備/第三章節 Python文件操做、函數、裝飾器/71-文件處理-智能檢測編碼的工具.py", line 1, in <module> import chardet ModuleNotFoundError: No module named 'chardet' Process finished with exit code 1
二、安裝第三方類庫python
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 <DIR> . 2017/12/14 15:04 <DIR> .. 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>
三、 升級pip程序ide
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>