AttributeError: module 'pip' has no attribute 'main'如何解决?
AttributeError: module ‘pip’ has no attribute ‘main’如何解决?
主要原因是由于当前环境的pip 版本10.0没有main()
一:基于解释器创建新工程
在命令行查看cpython解释器上的pip版本
在cmd中输入:
pip --version
如果cpython解释器上的版本没有升级到10的话,就简单了,直接在pycharm中基于cpython解释器新建一个工程工程就可以了,新的工程环境拷贝来自解释器的三方库的安装文。然后就可以在这个新的工程中正常安装第三方库了,可以把之前写的代码迁移到新工程之中.
二:重新安装低版本的pip版本
如果cpython解释器上的版本已经升级到10的话 在cmd命令行中输入以下命令重新安装其他版本的pip
python -m pip install --upgrade pip==9.0.3
注意:cmd模式下安装的第三方库都是安装到cpython解释器所在位置
在安装成功后,可以依照第一步一样,重新创建工程,迁移文件。
---------------------
作者:ls-x
来源:CSDN
原文:https://blog.csdn.net/ly004499/article/details/80356701
版权声明:本文为博主原创文章,转载请附上博文链接!
AttributeError: module 'pip' has no attribute 'main'如何解决?相关推荐
- 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module ‘pip‘ has no attribute ‘main‘ 解决方法
[pycharm]pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 参考文章: (1) ...
- AttributeError: module 'pip' has no attribute 'main'
Pycharm在运行pip安装模块是报错如下: 解决方法: 找到安装路径下的packaging_tool.py文件修改如下: 我的路径为D:\Program Files\JetBrains\PyCha ...
- pycharm无法安装第三方的包(AttributeError: module 'pip' has no attribute 'main')
没修改之前:找到安装目录下helps/packageing_tools.py 修改之后; ok
- Pycharm 解决pip遇到的错误:module 'pip' has no attribute 'main'
在pycharm中安装包是出现了如下错误: "AttributeError: module 'pip' has no attribute 'main'" 解决: 修改pycharm ...
- 解决pycharm问题:module ‘pip‘ has no attribute ‘main‘
解决pycharm问题:module 'pip' has no attribute 'main' 参考文章: (1)解决pycharm问题:module 'pip' has no attribute ...
- ImportError: module ‘pip‘ has no attribute ‘main‘
问题原因:在安装tensorflow时提示pip版本有问题,于是系统自动将现有的pip版本卸载了,可是在卸载了之后在执行pip安装时提示ImportError: module 'pip' has no ...
- 解决pycharm安装包过程出现的问题:module 'pip' has no attribute 'main'
解决pycharm安装包过程出现的问题:module 'pip' has no attribute 'main' 问题 更新pip之后,Pycharm安装package出现如下报错:module 'p ...
- AttributeError: module ‘tensorflow‘ has no attribute ‘Session‘错误解决
AttributeError: module 'tensorflow' has no attribute 'Session'错误解决 根据网上教程安装tensorflow环境时,最后都会有个测试代码用 ...
- AttributeError: module 'tensorflow' has no attribute 'Session'错误解决
Ubuntu刚安装好Tensorflow以后运行 import tensorflow as tf tf.Session() 报错AttributeError: module 'tensorflow' ...
- 【Python】AttributeError: module ‘numpy’ has no attribute ‘unit8’ 的解决方法
经排查,下面的一行代码出了异常: mask2 = np.where((mask1 == 2) | (mask1 == 0), 0, 1).astype('unit8') 异常类型是: Attribut ...
最新文章
- python【数据结构与算法】搜索初探
- 【字符串处理算法】最长连续字符及其出现次数的算法设计及C代码实现
- bootstrap-table 新增可编辑行_现代Web开发堆栈工具DevExtreme 新增Gantt组件,助力项目管理...
- JS 入门经典 第三章 判断、循环和函数
- 使用Visual Studio开发游戏——微软宣布与Unity、Unreal Engine和Cocos展开全新合作
- Only Link: Inheritance — private and protected inheritance in c++
- Atitit 动态调用webservice与客户端代理方式调用
- 高淇Struts2.0教程之视频笔记(4)
- jsp mysql新闻管理系统_基于jsp实现新闻管理系统 附完整源码
- office 打开wps乱_word打开wps是乱码怎么办
- 同花顺如何切换k线_同花顺k线图怎么切换(aud和人民币的汇率)
- centos7,php7.3使用pecl安装swoole,新手教学
- 干货!纯干货! 手把手教你做云专线互联网备援接入-上集
- java pptx转图_Java 将PPT转换为图片格式
- java jsp使用flash播放mp4,(jsp/html)网页上嵌入播放器(常用播放器代码整理)
- 我的世界服务器自建主城,我的世界服务器
- 简单的记账方法有哪些?
- 企业落地级jmeter性能测试,结果分析以及报告(4-3)
- Qt之QLCDNumber
- 【操作系统作业】睡觉助教(用Java的ReentrantLock实现)
热门文章
- 修复 WordPress 的 is_dir(): open_basedir restriction in effect. 错误
- 又有近百名研究生拟被退学!背后理由值得我们深思
- 如何使用Malab实现你的量化交易略
- 博客园的成长史,全都烙印在从古至今的 400 多万条评论里了
- MySQL能力全开放,OceanBase 社区版 4.0 正式上线
- Oracle打印日历功能
- 网页H5纯Web无插件多路RTSP视频播放
- python模拟微信红包
- Java作业 逢7过、成绩选奖、课程类
- java/php/node.js/python基层党支部建设平台【2024年毕设】