【Python】【亲测好用】安装第三方包报错:AttributeError:'module' object has no attribute 'main'

安装/卸载第三包可能出现如下问题及相应解决办法:

在pycharm编辑中,使用anconda2更新、卸载第三方包时,出现如下错误:

AttributeError:'module' object has no attribute 'main'

【Python】【亲测好用】安装第三方包报错:AttributeError:'module' object has no attribute 'main'

原因:新版pip中的main函数已经发生了变化,pip版本的原因,pip version 10.0.1,旧版本不会出现问题

参考:PyCharm 2017.3 在pip10.0.0版本中报错(module 'pip' has no attribute 'main')

http://coffeebrother.cn/post/35/

解决办法如下:

打开PycharmPyCharm Community Edition 2017.3helpers路径修改packaging_tool.py文件

【Python】【亲测好用】安装第三方包报错:AttributeError:'module' object has no attribute 'main'

packaging_tool.py文件进行如下修改:

【Python】【亲测好用】安装第三方包报错:AttributeError:'module' object has no attribute 'main'

重新更新、卸载,能够成功加载第三包了!