很久一段时间没有更新Pycharm当中的package了,今天打开Pycharm点击package更新,发生了错误,AttributeError:module 'pip' has no attribute 'main',如图所示:

  按照网上其他网友所介绍的解决方案是,找到Pychram安装目录下 helpers/packaging_tool.py文件,找到如下代码:

  将上述两个方法的代码改动一下,如图所示:

  其实这个是不完整的,你会发现更新的时候还是报错了,没有把代码看完整,下面的那个return的pip已经没有用了,所以需要去除掉,否则会报:NameError: name 'pip' is not defined  错误。如图所示:

  最终代码修改如下:

PS:如有疑问,请留言,未经允许,不得私自转载,转载请注明出处:https://www.cnblogs.com/xuliangxing/p/9615957.html

 

解决Pycharm更新package出现的问题:AttributeError:module 'pip' has no attribute 'main'的更多相关文章

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

    Pycharm安装package报错:AttributeError: module 'pip' has no attribute 'main' 确认pip已经升级到目前最新版本了. 在网上搜寻后,解决 ...

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

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

  3. Jupiter 页面环境下使用pip无法安装(AttributeError: module 'pip' has no attribute 'main')

    异常: AttributeError Traceback (most recent call last) <ipython-input-5-880e5dfa627c> in <mod ...

  4. 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法

    pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 解决方法: 在pycharm的安装目 ...

  5. Python 3.6安装yaml时报"AttributeError: module 'pip' has no attribute 'main'"和“Non-zero exit code”错误

    1.Python 3.6安装yaml时一开始报AttributeError: module 'pip' has no attribute错误,根据网上提供的解决方法修改Pycharm安装目录D:\Pr ...

  6. 解决pycharm报错:AttributeError: module 'pip' has no attribute 'main'

    找到pycharm安装目录下 helpers/packaging_tool.py文件,找到如下代码: def do_install(pkgs): try: import pip except Impo ...

  7. pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'

    需求:安装suds模块 遇到的问题: 一.报错信息:[file][Default Settint]---Project Interpreter 点击 搜索suds安装模块报错 解决:依据上图提示找到C ...

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

  9. AttributeError: module 'pip' has no attribute 'main'

    Pycharm在运行pip安装模块是报错如下: 解决方法: 找到安装路径下的packaging_tool.py文件修改如下: 我的路径为D:\Program Files\JetBrains\PyCha ...

随机推荐

  1. db2删除表中数据

    DB2数据库系统建表后,难免会有将表中数据清空的需求,本文将为您介绍DB2数据库中四种数据删除的方法,供您参考,您可以根据实际情况来进行选择,希望能对有所帮助. 1. 使用 DELETE 语句,即: ...

  2. delphi button 实现下拉列表

    unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms ...

  3. Updating and Publishing a NuGet Package - Plus making NuGet packages smarter and avoiding source edits with WebActivator

    I wrote a post a few days ago called "Creating a NuGet Package in 7 easy steps - Plus using NuG ...

  4. Data type conversion in MongoDB

    [问题] I have a collection called Document in MongoDB. Documents in this collection have a field calle ...

  5. Docker 集群Swarm创建和Swarm Web管理

    关于Docker Swarm更多的介绍请查看<Docker管理工具-Swarm部署记录> 一.环境配置 1.安装环境 # cat /etc/redhat-release CentOS Li ...

  6. 关于海康威视与Unity3d集成冲突问题解决

    一.集成 1.1 了解什么是ANSI系列与GNU系列    https://baike.baidu.com/item/ANSI%20C/7657277?fr=aladdin    https://ww ...

  7. 试水STF(smartphone test farm)

    STF简介 简介: STF , smartphone test farm, 是一款能够通过浏览器远程管理智能设备的系统, 能为移动自动化测试提供方便快捷的服务,免去测试工程师的后顾之忧. 功能点: 支 ...

  8. C#语法——泛型的多种应用 C#语法——await与async的正确打开方式 C#线程安全使用(五) C#语法——元组类型 好好耕耘 redis和memcached的区别

    C#语法——泛型的多种应用   本篇文章主要介绍泛型的应用. 泛型是.NET Framework 2.0 版类库就已经提供的语法,主要用于提高代码的可重用性.类型安全性和效率. 泛型的定义 下面定义了 ...

  9. Android Studio系列-签名打包

    本篇博客纪录使用Android Studio对项目进行签名打包,跟Eclipse大同小异,读者朋友注意其中到差别. 第一步 创建签名文件 第二步 填写签名参数 第三步 选择构建类型 第四步 查看生成第 ...

  10. users-and-groups-in-linux

    https://www.tecmint.com/compress-files-and-finding-files-in-linux/ https://www.tecmint.com/manage-us ...