首先,检查你的pip命令能否正常下载,如果不能更换成镜像源
遇到src/cchardet1_cchardet.cpp(196):fata1 error1083:元话于J开包i又件:"1 ongintrepr.h”:No such fi1 e or directory
error:command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\VC\\Tools\\MSVC\\14.40.33807\\bin
HostX86\\x64\\cl.exe failed with exit code 2
Lend or output]
note:This error originates from a subprocess,and is likely not a problem with pip.
ERROR:Failed building wheel for cchardet
Failed to build cchardet
ERROR:ERROR:Failed to build installable wheels for some pyproject.toml based projects (cchardet)
错误图片
你先 pip install pyproject-toml,pyproject-toml · PyPI ,
后面再安装chardet,方法同上
就可以了
成功了!