linux学习笔记——linux环境下安装mmdetection

工作整理,一起学习。
由于是Linux系统,网上很多解决方式均基于Windows,因此整理。
要在错误中成长。

标题挂载中出现 can’t find in /etc/fstab

想要将数据挂载:

#解决:
mnt前需要有空格,不要随便去除,代表对应的路径。

安装virtualenv后出现以下问题

virtualenv: command not found

sudo apt-get update
sudo apt-get install python-virtualenv

创建环境时出现Permission denied

sudo virtualenv venv

激活环境

#激活
source venv/bin/activate
#venv是环境名

需要安装python3.8,但是使用指令安排总出现错误,最后解决

sudo apt-get install python3.8
#但是这个无法下载pip3.8,建议还是用文件夹解压,后续创建软链接,替换虚拟环境中的pip

安装pytorch

#出现错误
failed to build pillow

参照解决安装Failed building wheel for pillow

apt-get install libjpeg-dev zlib1g-dev
pip3 install Pillow

学习到了软链接的问题
服务器自带python2.7和3.6,需要安装3.8,上述安装方法进行安装后,在虚拟环境中的python还是只有2.7和3.6.

sudo ln -s /usr/local/python3.8/python3.8 /home/xxx/venv/bin/python 
           #此处是python3.8的安装地址       #软连接处的地址
sudo ln -s /usr/local/python3.8/pip3.8 /home/xxx/venv/bin/pip

这样就可以将pip连接到pip3.8,python连接到python3.8。

安装mmdetection

#首先,升级pip
pip install --user --upgrade pip
#第一步依旧是安装pytorch
pip install torch torchvision #有版本问题,这个有个体性差异
#第二步 安装mmdet和mmcv-full
pip install mmdet
pip install mmcv-full

出现的比较难解决的错误

mmdet安装错误

error: maskApi.c: No such file or directory
could not building wheels for mmpycocotools

依据这篇文章
关于安装MMdetection2.11.0版本中,mmpycocotools安装报错【gcc: error: …/common/maskApi.c: No such file or directo】

pip install cython==0.29.33
pip install mmpycocotools
pip install mmdet==2.5.0

mmcv安装错误

Complete output (16 lines): Couldn‘t find index page for ‘pytest-runner‘ 

依照此文章
安装torch_geometric时error:Complete output (16 lines): Couldn‘t find index page for ‘pytest-runner‘ (ma

pip install pytest-runner

终端打开Pycharm

直接点击快捷方式会卡顿,使用命令:

sudo pycharm

还有遇到couldn’t load the Qt platform plugin xcb的问题

根据这篇文章解决。
Ubuntu下Python程序出现错误qt.qpa.plugin: Could not load the Qt platform plugin xcb解决方法

————8/31 更新

unpickling stack underflow

我在load本地上的pth文件出现的这个问题,因此网络上的方法没办法解决。后面发现是复制文件的时候没有复制完全。

————9.6
下载pycocotools的问题实在没有解决,最后依旧用了mentor的环境,但是需要修改activate pip python 等文件的内容,将用户名进行修改。
心态上的:遇到问题,勇敢求助!!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Linux系统下配置mmdetection环境,可以参考以下步骤: 1. 首先,创建一个虚拟环境。你可以使用Anaconda或者其他虚拟环境管理工具来创建。可以参考引用中的笔记来了解如何在Anaconda中创建虚拟环境。 2. 接下来,安装必要的软件和依赖项。这包括PyTorch、CUDA、MMCV和MMDet等。可以参考引用中的文档来了解如何安装这些软件和依赖项的详细过程。 3. 完成软件和依赖项的安装后,可以开始配置mmdetection环境了。这包括设置环境变量、安装必要的Python包和库等。具体的配置步骤可以参考引用中记录的步骤。 4. 最后,你可以使用PyCharm等IDE来配置mmdetection的虚拟环境,并开始开发和运行你的项目。可以参考引用中的笔记了解如何在PyCharm中配置mmdetection虚拟环境。 总之,通过创建虚拟环境安装必要的软件和依赖项,并按照引用、和中提供的步骤进行配置,你就可以成功在Linux系统下配置mmdetection环境了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [配置mmdetection环境.txt](https://download.csdn.net/download/qq_39625973/12675546)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [(linuxmmdetection环境配置gpu+anaconda+pycham+ RTX2080ti 笔记](https://blog.csdn.net/chao_xy/article/details/129520254)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Linux系统配置mmdetection3d环境](https://blog.csdn.net/CSDNxiaoh/article/details/125321921)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值