Ubuntu pip AttributeError: 'module' object has no attribute '_main'
在Ubuntu中,使用pip安装python库,可能报错'module' object has no attribute '_main'。
原因是由于 pip10.0 没有main(),我们需要对 pip 进行降级,降为原版本。
// 可查看当前python版本
$ python -V
// 修改“/usr/bin/pip2”文件,把文件中第一行的“#!/usr/bin/python”改为“#!/usr/bin/python2” 即可
$ sudo vim /usr/bin/pip2
// 使用pip2下载
$ pip2 install xxxxx
Ubuntu pip AttributeError: 'module' object has no attribute '_main'相关推荐
- Python 报错解决:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
早上升级完pip,后报错如下: -> # pip install --upgrade pwntools /usr/local/lib/python2.7/dist-packages/pip/_v ...
- AttributeError: 'module' object has no attribute 'text_format'
最近在学习 faster rcnn ,本来环境已经配置好,已经跑完自己的程序,运行良好,后来安装了tensorflow,然后重新使用 faster rcnn 进行训练的时候居然出错了,我很纳闷,期间没 ...
- AttributeError: 'module' object has no attribute '_base'
较为完整的错误信息是: class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder): AttributeError: ...
- AttributeError: ‘module‘ object has no attribute ‘CALIB_HAND_EYE_PARK‘
ubuntu18.04 ROS:melodic python2.7的环境 File "/home/bionic/yuxiangROS_handeye/catkin_ws/src/handey ...
- tensorflow报错:AttributeError: 'module' object has no attribute 'get_or_create_global_step'
Tensorflow 1.0训练官方教程中CIFAR10例子 官方教程 执行 python cifar10_train.py时 报错: AttributeError: 'module' objec ...
- Tensorflow报错:AttributeError: 'module' object has no attribute 'scalar_summary'
报错: tf.scalar_summary(l.op.name + ' (raw)', l) AttributeError: 'module' object has no attribute 'sca ...
- Python AttributeError: 'module' object has no attribute 'posseg'
AttributeError: 'module' object has no attribute 'posseg' 遇到问题: 如果 a 是个目录, b 是个 b.py 文件, func 是 b.py ...
- pytorch版本问题:AttributeError: 'module' object has no attribute '_rebuild_tensor_v2'
用pytorch加载训练好的模型的时候遇到了如下的问题: AttributeError: 'module' object has no attribute '_rebuild_tensor_v2' 到 ...
- tensorflow出现如下错误:AttributeError: ‘module’ object has no attribute ‘merge_all_summaries’
tensorflow版本问题,导致函数的变化,summary使用如下变化机制: AttributeError: 'module' object has no attribute 'merge_all_ ...
- AttributeError: 'module' object has no attribute 'get_frontal_face_detector'
AttributeError: 'module' object has no attribute 'get_frontal_face_detector' 报错原因: 命名为的文件将遮盖dlib具有所需 ...
最新文章
- 这些SpringBoot天生自带Buff工具类你都用过哪些?
- 报名 | 2019年社会计算机国际会议
- redis的观察者模式----------发布订阅功能
- 全球最大AI巨量模型,参数2457亿炼丹16天专注中文,打造者绝对让你意外
- 译C#使用设计模式和软件设计原则构建应用程序 PartIII
- 用键盘全局钩子[Hook]监视多进程键盘操作
- esp32外部中断_玩转 ESP32 + Arduino (四) 电容按键 霍尔传感器 外部中断 延时 脉冲检测...
- 2002: [Hnoi2010]Bounce 弹飞绵羊
- POJ 2533 Longest Ordered Subsequence
- 解决Ubuntu16.04 fatal error: json/json.h: No such file or directory
- 老司机整理对Nginx性能优化
- Openstack api 使用方法
- python3 annotations
- 《JSjQuery 交互式web前端开发》(四)判断和循环
- 万年历c语言程序微博,简易的万年历程序C语言
- 紫猫插件-网络共享数据(1-6)
- ios 旋转屏幕试图切换_iOS播放器横竖屏切换的实现
- cartographer探秘第三章之对比实验
- Matlab中imag函数用法
- 在线教育项目【老师服务】
热门文章
- 如何克服枯燥工作带来的单调感和厌烦感
- LVS (Linux虚拟服务器)模型及算法
- (第一周)2018091-2 博客作业
- springboot输出日志到文件配置
- 利用GDAL进行工具开源化改造
- 关于 javadoc
- 继承中的盲点,成员或者析构函数,成员函数中为什么有时候需要定义,有时候不需要呢,(已解决)...
- 孙鑫VC学习笔记:第九讲 界面修改,工具栏,状态栏,启动画面的制作
- 拓端tecdat|R语言逻辑回归(Logistic Regression)、回归决策树、随机森林信用卡违约分析信贷数据集
- 拓端tecdat|R语言对HullWhite短期利率模型仿真