1.打开文件packaging_tool.py:

  D:\Program files\pycharm\PyCharm 2016.3.2\helpers\packaging_tool.py

2.添加导入:

  import pip._internal as pip_new

3.修改参数

  修改前的代码为:  

def do_install(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['install'] + pkgs) def do_uninstall(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['uninstall', '-y'] + pkgs)

  修改后的代码:

def do_install(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip_new.main(['install'] + pkgs) def do_uninstall(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip_new.main(['uninstall', '-y'] + pkgs)

Pycharm 报错 AttributeError: module 'pip' has no attribute 'main'的更多相关文章

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

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

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

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

  3. Pycharm安装模块提示module 'pip' has no attribute 'main'的问题

    解决pycharm问题:module 'pip' has no attribute 'main' 转自: <解决pycharm问题:module 'pip' has no attribute ' ...

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

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

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

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

  6. 解决Pycharm更新package出现的问题:AttributeError:module 'pip' has no attribute 'main'

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

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

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

  8. 使用jieba导入引用方法时,报错AttributeError: module 'jieba' has no attribute 'cut'

    一.问题描述 import jieba导入后,使用jieba.cut()方法时报错AttributeError: module 'jieba' has no attribute 'cut' 二.问题分 ...

  9. 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 ...

随机推荐

  1. knn的python代码

    import heapq import random class Classifier: def __init__(self, bucketPrefix, testBucketNumber, data ...

  2. Nginx搭建后,图片存储在Tomcat上,前端无法回显图片问题

    一.Nginx与Tomcat连接搭建的环境,Nginx设置了前端的访问路径为 (1)前端代码配置: root /usr/local/nginx/html; index index.html index ...

  3. ASP.NET Core 中的应用程序启动 Startup

      ASP.NET Core 应用使用Startup类来作为启动类.   Startup类中包含了ConfigureServices方法,Configure方法,IConfiguration,IHos ...

  4. Android-进程理解/进程的优先级别

    进程理解 Android系统最小的控制单元是:进程 process 应用/CPU最小的控制单元是:线程 thread 一个应用一个 process 进程 一个应用一个 package(包是唯一的) 一 ...

  5. Jenkins 集成 git .net 和nuget

    1. 源码配置 在 Credentials中配置 git 账号密码(如果是Gitee  可以使用 Jenkins Gitee Plugin) 2. 构建编译版本 2.1 批处理的目的 还原Nuget包 ...

  6. Centos7 创建Eclipse启动

    Eclipse是一个集成开发环境(IDE),包含一个基工作区和定制环境的可扩展插件系统.大部分使用 Java 编写,Eclipse 可以用来开发应用程序.通过各种插件,Eclipse 也可以用于其他编 ...

  7. c# async 事物

    上菜 async await 机制 确实便捷开发   多线程时 如何一致性如何保证呢? public async Task<ActionResult<IEnumerable<stri ...

  8. Java50道经典习题-程序6 求最大公约数及最小公倍数

    题目:输入两个正整数m和n,求其最大公约数和最小公倍数.分析:用辗转相除法求最大公约数    两个数的最大公约数:设两个数分别为n和m,(n>=m);用定义一个变量i,使用for循环,将i的取值 ...

  9. 工作中常用Linux命令

    建立软链接  ln -s      例:ln -s b a 解释:把文件夹a和文件夹b关联起来,访问文件夹a,实际访问的是问价夹b 删除软连接  rm -rf a  直接删掉a文件夹跟a和b的软连接. ...

  10. Comet OJ - Contest #0题解

    传送门 菜爆了--总共只有一道题会做的--而且也没有短裙好难过 为啥必须得有手机才能注册账号啊喂--歧视么-- \(A\) 解方程 推一下柿子大概就是 \[x-\sqrt{n}=y+z+2\sqrt{ ...