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.添加导入:
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'的更多相关文章
- [已解决]pycharm报错:AttributeError: module 'pip' has no attribute 'main'
> 更新pip后,pycharm更新模块报错,经过一番查找,现提供两种解决办法. 报错片段信息如下: AttributeError: module 'pip' has no attribute ...
- pycharm安装 package报错:module 'pip' has no attribute 'main'
转自: <pycharm安装 package报错:module 'pip' has no attribute 'main'> https://www.cnblogs.com/Fordest ...
- Pycharm安装模块提示module 'pip' has no attribute 'main'的问题
解决pycharm问题:module 'pip' has no attribute 'main' 转自: <解决pycharm问题:module 'pip' has no attribute ' ...
- 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法
pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 解决方法: 在pycharm的安装目 ...
- Pycharm安装package报错:AttributeError: module 'pip' has no attribute 'main'
Pycharm安装package报错:AttributeError: module 'pip' has no attribute 'main' 确认pip已经升级到目前最新版本了. 在网上搜寻后,解决 ...
- 解决Pycharm更新package出现的问题:AttributeError:module 'pip' has no attribute 'main'
很久一段时间没有更新Pycharm当中的package了,今天打开Pycharm点击package更新,发生了错误,AttributeError:module 'pip' has no attribu ...
- Jupiter 页面环境下使用pip无法安装(AttributeError: module 'pip' has no attribute 'main')
异常: AttributeError Traceback (most recent call last) <ipython-input-5-880e5dfa627c> in <mod ...
- 使用jieba导入引用方法时,报错AttributeError: module 'jieba' has no attribute 'cut'
一.问题描述 import jieba导入后,使用jieba.cut()方法时报错AttributeError: module 'jieba' has no attribute 'cut' 二.问题分 ...
- 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 ...
随机推荐
- 13 Calculating Expected Offspring
Problem For a random variable XX taking integer values between 1 and nn, the expected value of XX is ...
- SpringMVC源码解析 - HandlerAdater - ModelAndViewContainer上下文容器
HandlerAdapter在处理请求时上下文数据的传递工作是由ModelAndViewContainer负责的. 源码注释是这样描述的: Records model and view related ...
- eclipse mac
在mac下安装eclipse,挺简单的.只是字体会发虚,有点麻烦. 安装完成后,双击eclipse图标,显示包内容,contents--info.plist,在</dist>前加<k ...
- Java enum枚举类型
java的枚举类型详解: 简单示例: public enum Color{ RED,BLUE,BLACK,YELLOW,GREEN } 复杂示例(带自定义构造方法与类型) public enum En ...
- mysql导入数据load data infile用法(转)
们常常导入数据!mysql有一个高效导入方法,那就是load data infile 下面来看案例说明 基本语法: load data [low_priority] [local] infile ' ...
- 为已经存在的TFS团队项目配置SharePoint集成
配置好TFS团队项目集合与SharePoint站点集的集成后,就可以在新建TFS团队项目时集成SharePoint站点,也可以为已经存在的团队项目配置SharePoint站点的集成,如下图: Fi ...
- JAVA—Filter
过滤器 Filter 1. Filter简介. filter 是对客户端访问资源的过滤,符合条件放行,不符合条件不放行, 并且可以对目标资源访问前后进行逻辑处理. 2. Filter 的API 详解. ...
- WCF实现进程间管道通信Demo
一.代码结构: 二.数据实体类: using System; using System.Collections.Generic; using System.Linq; using System.Run ...
- 【转】Sql Server去除所有空格
详细链接:https://shop499704308.taobao.com/?spm=a1z38n.10677092.card.11.594c1debsAGeak 1.普通空格: 前后的空格,使用LT ...
- sqlserver排名函数
在做开发的时候,排名函数是sqlserver经常用到的函数,在分页的时候需要用,分组的时候也要用,主要排名函数有row-number,rank(),dense-rank(),NTILE()接下来详细说 ...