在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. [认证授权] 2.OAuth2授权(续) & JWT(JSON Web Token)

    1 RFC6749还有哪些可以完善的? 1.1 撤销Token 在上篇[认证授权] 1.OAuth2授权中介绍到了OAuth2可以帮我们解决第三方Client访问受保护资源的问题,但是只提供了如何获得 ...

  2. Elasticsearch 通关教程(六): 自动发现机制 - Zen Discoveryedit

    发现方式 Zen discovery是内建的.默认的.用于Elasticsearch的发现模块.它提供了单播和基于文件的发现,可以通过插件扩展到支持云环境和其他形式的发现. Zen Discovery ...

  3. php 计算两点地理坐标的距离

    <?php /** * 计算两点地理坐标之间的距离 * @param Decimal $longitude1 起点经度 * @param Decimal $latitude1 起点纬度 * @p ...

  4. 正则 re模块

    Python 正则表达式 re 模块 简介 正则表达式(regular expression)是可以匹配文本片段的模式.最简单的正则表达式就是普通字符串,可以匹配其自身.比如,正则表达式 ‘hello ...

  5. c语言利用读取命令行(多行读取)

    #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { FILE *fh = po ...

  6. P3366 【模板】最小生成树

    原题链接 https://www.luogu.org/problemnew/show/P3366 一道最小生成树的模板题...... 昨天刚学最小生成树,wz大佬讲的一塌糊涂井然有序,所以我们今天做起 ...

  7. ubuntu配置ssh连接方式

    pgadmin4 配置界面的password指的是数据库用户的密码, 不是服务器的密码. pg数据库 1.确保远程服务器开放相应端口.这个是在防火墙设置. 2.pg数据库服务器允许外部ip访问, 默认 ...

  8. 用CNN对CIFAR10进行分类(pytorch)

    CIFAR10有60000个\(32*32\)大小的有颜色的图像,一共10种类别,每种类别有6000个. 训练集一共50000个图像,测试集一共10000个图像. 先载入数据集 import nump ...

  9. MySql自动备份shell

    MySql黑屏备份是每个运维工程师必备的技能,以下是MySQL自动备份脚本: #/bin/bash#This is mysql backup shell on 2019/4/28 BAKUP_DIR= ...

  10. Alice and Bob HDU - 4111 (SG函数)

    Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. The ...