在pycharm中安装pandas出现报错:AttributeError: 'module' object has no attribute 'main',

刚开始以为是pip的版本太旧了,于是乎将其做了升级(python -m pip install -U pip),结果还是不行。

百度了好多都没有找到问题出现在哪里,后面看到了一篇博文中说到时因为

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

旧版的pycharm中 在packaging_tool.py 中引用的就是 pip.main()方法,所以会报错。

解决方法:

1、打开pycharm的所在位置,找到X:\PyCharm\PyCharm 2018.1\helpers

2、下载最新的packaging_tool.py替换里面的packaging_tool.py

3、重新再pycharm中安装 pandas即可

packaging_tools.py下载地址

链接:https://pan.baidu.com/s/1I36ZLjbUeCmJc8_rsdrNDw
提取码:i1ob

参考:https://blog.csdn.net/qq_34802511/article/details/82528778

安装pandas报错(AttributeError: 'module' object has no attribute 'main')的更多相关文章

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

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

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

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

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

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

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

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

  5. 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.添加导入: ...

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

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

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

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

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

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

  9. py+selenium 明明定位不到元素,但却不报错或是报错AttributeError: 'list' object has no attribute 'click'【已解决】

    问题:定位不到元素,但却不报错或者出现报错AttributeError: 'list' object has no attribute 'click' 如图  或者  解决方法:   将”driver ...

随机推荐

  1. R语言学习——图形初阶之散点图

    使用R内置的数据框mtcars,绘制车身重量与每加仑汽油行驶的英里数的散点图,要求横轴为车身重量(wt),纵轴为每加仑汽油行驶的英里数(mpg),并添加最优拟合曲线.标题,输出为pdf文件.代码实现如 ...

  2. 移动端左右滑动问题-html与css解决

    <!DOCTYPE html> <html> <head> <title>纯css实现左右滑动</title> <style type ...

  3. 毕业设计(1)基于MicroPython的大棚监测控制系统的程序设计与模型设计

    智慧农业就是将物联网技术运用到传统农业中去,运用传感器和软件通过移动平台或者电脑平台对农业生产进行控制,使传统农业更具有“智慧”.除了精准感知.控制与决策管理外,从广泛意义上讲,智慧农业还包括农业电子 ...

  4. Swing 混合布局

    案例一:Border边境边界 package swing; /** * swing 混合布局 */ import java.awt.*; import javax.swing.*; public cl ...

  5. springboot中访问jsp文件方式

    首先,添加加载jsp文件的依赖包: <!--jsp依赖 对应springboot版本为2.1.4--><dependency> <groupId>org.apach ...

  6. Django2 Django MTV模板

    1.MVC模型 Web服务器开发领域里著名的MVC模式,所谓MVC就是把Web应用分为模型(M),控制器(C)和视图(V)三层,他们之间以一种插件式的.松耦合的方式连接在一起,模型负责业务对象与数据库 ...

  7. elastic的gc相关

    https://www.jianshu.com/p/1f450826f62e   gc原理介绍 相关优化 https://zhaoyanblog.com/archives/319.html 问题 ht ...

  8. Python_002_Python语言基础

    ♥2.1  Python的程序概述 Python程序可以分解为模块.语句.表达式.对象 ♥2.2  Python对象和引用 2.2.1  Python对象概述 对象:标识(identity).类型(t ...

  9. JS设置Cookie过期时间

    //JS操作cookies方法! //写cookies function setCookie(name,value) { var Days = 30; var exp = new Date(); ex ...

  10. Android activity创建三部曲

    1.新建类继承Activity或其子类,现在一般继承AppCompatActivity public class TestActivity extends AppCompatActivity { @O ...