pip升级到 10.0.1 之后 老版的pycharm 使用pip安装第三方库的时候会报错,报错如上图所示:

其主要原因是 新版的 pip 更改了 部分api 将其中 pip.main() 改为 pip_main(),

旧版的pycharm中 在packaging_tool.py 中引用的就是 pip.main()方法,所以会报错。
最简单的、最完美的解决方法为:
1.找到pycharm 目录下的 \helper\packaging_tool.py 文件
2.用新版pycharm 的packaging_tool.py 替换 旧版 同名文件
ps:博主的pycharm是2017.2.4的 更老的版本 是否试用此方法 还有待尝试
 
新版packaging_tool.py文件下载路径为:
 
链接:https://pan.baidu.com/s/1nMIrm5ArlUK6nB1xnJ8ptA 密码:mwzp

pycharm 安装第三方库报错:AttributeError: 'module' object has no attribute 'main'的更多相关文章

  1. [已解决]pycharm报错:AttributeError: module 'pip' has no attribute 'main'

    > 更新pip后,pycharm更新模块报错,经过一番查找,现提供两种解决办法. 报错片段信息如下: AttributeError: module 'pip' has no attribute ...

  2. python文件名不要跟模块名相同,报错AttributeError: 'module' object has no attribute 'Differ'

    python中的文件都会生成pyc文件,包括模块也是这样,所以调用模块的时候,实际上会调用模块.pyc文件:在这个前提下,如果将文件名命名成跟模块名一样,在同一目录下就会生成一个跟模块名一样的pyc文 ...

  3. 运行pytest,报错"AttributeError: 'module' object has no attribute 'xxx'"

    最近学习pytest被此问题困扰,敲脑壳,实在是不该.百度解决方法一大堆,我的问题怎么也解决不了,来看一下,我是怎么解决的,各位大佬勿喷,只是自己做笔记用,谢谢. 报错信息如下: 网上解决方法是这样的 ...

  4. Pycharm 报错 AttributeError: module 'pip' has no attribute 'main'

    1.打开文件packaging_tool.py: D:\Program files\pycharm\PyCharm 2016.3.2\helpers\packaging_tool.py 2.添加导入: ...

  5. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

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

    安装/卸载第三包可能出现如下问题及相应解决办法: 在pycharm编辑中,使用anconda2更新.卸载第三方包时,出现如下错误: AttributeError:'module' object has ...

  7. 安装pandas报错(AttributeError: 'module' object has no attribute 'main')

    在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main', 刚开始以为是pip的版本太旧了,于是乎将其 ...

  8. pycharm安装 package报错:module 'pip' has no attribute 'main'

    转自: <pycharm安装 package报错:module 'pip' has no attribute 'main'> https://www.cnblogs.com/Fordest ...

  9. dnspython模块报错 AttributeError: 'CNAME' object has no attribute 'address'

    有时候用到这个模块的时候会报错 AttributeError: 'CNAME' object has no attribute 'address' 如下所示 [root@ansible ch01]# ...

随机推荐

  1. Mark,20180127,技术博客之路开启!

    不怎么会说话,自己本身少说话的撸码loner,少说多做.毕业从事手游一年多,之前主要从事Cocos2dx,刚转投Unity不到一个月,后面主要总结下自己在这两方面开发过程中的一些历程,希望自己能有所积 ...

  2. [leetcode]75. Sort Colors三色排序

    Given an array with n objects colored red, white or blue, sort them in-place so that objects of the ...

  3. js中的instanceof运算符

    概述 instanceof运算符用来判断一个构造函数的prototype属性所指向的对象是否存在另外一个要检测对象的原型链上 语法 obj instanceof Object;//true 实例obj ...

  4. 选择困难症的福音——团队Scrum冲刺阶段-Day 7

    选择困难症的福音--团队Scrum冲刺阶段-Day 7 今日进展 测试代码 将界面设计完后放app使用示意图于此 今日贡献量 严域俊 吴恒佚 曾程 刘辰 邓煜坤 3.5 3.5 3.3 3.6 3 贡 ...

  5. [SoapUI] 检查测试步骤的类型或者或者某种特定类型的步骤列表

    SoapUI Groovy : Check if test step is of specific type, such as : Wsdl, Rest, Jdbc, HTTP, Groovy etc ...

  6. xbee无线通讯终端

    无线数传电台支持DIGI全系列无线数传模块,包括有xbee/xbee PRO S1.xbee/xbee PRO S2C.xbee WIFI.xbee PRO S3B.xbee/xbee PRO SX( ...

  7. android 学习网站

    菜鸟教程 http://www.runoob.com/android/android-tutorial.html Android基础入门教程  http://www.runoob.com/w3cnot ...

  8. 序列化与Json

    序列化: 将数据结构或对象转换成二进制串的过程. 反序列化:将在序列化过程中所生成的二进制串转换成数据结构或者对象的过程. 首先我们通过复制文件举例,这里面就包含序列化与反序列化的过程: public ...

  9. verilog 有符号数(2转)

    在数字电路中,出于应用的需要,我们可以使用无符号数,即包括0及整数的集合:也可以使用有符号数,即包括0和正负数的集合.在更加复杂的系统中,也许这两种类型的数,我们都会用到. 有符号数通常以2的补码形式 ...

  10. std::string的拷贝赋值研究

    说明:以下涉及的std::string的源代码摘自4.8.2版本.结论:std::string的拷贝复制是基于引用计数的浅拷贝,因此它们指向相同的数据地址. // std::string类定义type ...