操作系统:ubuntu18.04.6

最近在安装MMdetection3d时,其中一步需要安装pycocotools,但是直接采用

pip install pycocotools

进行安装时,我遇到了两个问题:

1. 安装速度慢

2. 遇到了报错

ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed

安装pycocotools困扰了3个整天的时间,因此我整理了博客,希望能够帮助到大家,也作为我以后需要的话,可以快捷地找到解决方法,

针对下载速度慢的问题,我们可以采用国内镜像进行下载,我一般习惯于采用清华镜像,运行

pip install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple

即可采用清华镜像进行下载,下载速度瞬间快了很多~

针对报错

ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed

这一问题,网上搜了很多方法都没有解决我的问题,最后我发现,安装gcc和g++可以解决这一问题。因为我是新配置的虚拟机,所以没有gcc和g++,而pycocotools的安装需要基于gcc和g++才可以运行

解决方法:安装gcc和g++

首先更新包列表,运行

sudo apt update

之后安装build-essential软件包

sudo apt install build-essential

该命令将安装包括gcc,g ++在内的一些包

一般来说,到这一步就可以解决了,但是我还遇到了

Ubantu18.04.6:依赖: g++-7 (>= 7.4.0-1~) 但是它将不会被安装

这样一个问题,后来我参考了这篇博文之后得到了解决     参考

但是需要注意的是,根据这篇文章的评论区,这种方法会降低一些软件的依赖,可能会造成一些危险的后果,所以各位慎用,我是实在没有办法了,所以尝试了这样的方法,最后问题得到了解决。

安装pycocotools时遇到ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be instal相关推荐

  1. Solved ERROR: Could not build wheels for hdbscan which use PEP 517 and cannot be installed directly

    Problem 尝试用 pip 在命令行安装 hdbscan 时,发生如下报错 pip install hdbscan ... Building wheels for collected packag ...

  2. ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

    问题描述 最近在ubuntu16.04上安装pwntools卡到一个问题,报错提示如下: ERROR: Could not build wheels for cryptography which us ...

  3. ERROR: Could not build wheels for mujoco-py which use PEP 517 and cannot be installed directly

    今天安装mujoco-py的时候,遇见了下面的错误: ➜ v2 pip install mujoco-py Looking in indexes: http://pip.baidu.com/root/ ...

  4. 安装opencv时报错:Could not build wheels for opencv-python which use PEP 517 and cannot be installed direc

    一.问题背景 最近写一批程序,需要用到opencv里面的函数,但是导入cv2的时候,新电脑提示没有安装,所以首先安装opencv的库,直接pip install opencv-python,不过报错了 ...

  5. 【错误记录】Mac 中 Python 报错 ( ERROR: Could not build wheels for numpy which use PEP 517 | 问题未解决 | 问题记录 )

    文章目录 一.报错信息 二.解决方案 一.报错信息 首先 , 更新 pip ; 执行如下命令 : /usr/local/bin/python3 -m pip install --upgrade pip ...

  6. 解决安装mmdet报错- ERROR: Could not build wheels for pycocotools, which is required to install pyproject.t

    记录一下自己在安装mmlab中的mmdet库遇到的问题,直接使用pip install mmdet报错如下: ERROR: Could not build wheels for pycocotools ...

  7. ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

    pip install pucuda 出现问题 pip install --upgrade pip setuptools wheel pip install -i https://pypi.tuna. ...

  8. ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based pro

    安装pycocotools时总是安装不成功?  问题1:ERROR:Could not build wheels for pycocotools, which is required to insta ...

  9. ERROR:Could not build wheels for pycocotools, which is required to install pyproject.toml-based

    我下载paddlex时候出现的问题 利用国内镜像资源下载比较快 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple paddlex 你以为这 ...

最新文章

  1. springMvc+mybatis+spring 整合 包涵整合activiti 基于maven
  2. 算法面试|论如何4个月高效刷满 500 题并形成长期记忆
  3. Python连续攀升,其他的脚本语言去哪了?
  4. 大型数据库的设计原则与开发技巧
  5. Hashtable和HashMap类的区别
  6. 20155303 《Java程序设计》实验一(Java开发环境的熟悉)实验报告
  7. CentOS操作系统密码复杂度策略设置
  8. cad布局怎么用_【CAD】CAD布局怎么用?
  9. 冰点还原精灵如何暂时关闭运行
  10. java-序列化以及反序列化
  11. .net remoting和wcf自托管——一个bug引发的警示
  12. 1500w播放下还藏着什么热点?B站2个未来趋势你不得错过
  13. 在form表单中添加一个隐藏的reset按钮,
  14. 2019/7/18ACM集训
  15. 知乎高赞:让自己更优秀的 16 条法则
  16. Spark——RDD操作详解
  17. 聚焦一带一路建设,助推装备工业发展—西部制博会3月15日即将启幕
  18. 从计算机科学理论视角看意识
  19. 北大ACM线上比赛有感
  20. 机顶盒软件组成及启动流程

热门文章

  1. 构建服务器集群感知的 Java 应用程序
  2. C#笔试面试精华 转
  3. ROS:创建机器人URDF模型
  4. 115个Java面试题和答案——终极(下)
  5. 程序验证Jackson反序列化的规则、Jackson序列化与反序列化关键方法程序详细分析
  6. matlab产生波形数据文件,用Matlab生成txt格式波形数据
  7. 做一个python的旅游系统_我把全国旅游数据用Python爬下来后发现,这个地方才是真正的旅游胜地...
  8. html中的垂直平分线,垂直平分线的判定
  9. Linux下u盘拔出后操作u盘可能会出现的异常
  10. 闲聊solr的简单使用