pip安装模块或者某个包出现错误时

错误描述:

 ImportError: The 'packaging' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\zyn\AppData\Local\Temp\pip-install-l2lr3u71\sklearn\

此时,通过pip list查看安装的setuptools的版本,如果不是19.2则卸载重装即可

解决办法步骤:

输入pip uninstall setuptools

pip install setuptools==19.2

然后重新安装原本要安装的模块或者包即可

 

你可能感兴趣的:(pip安装模块或者某个包出现错误时)