mmdetection训练数据遇到的问题
原文链接
1 Permission denied
报错:
-bash: ./compile.sh: Permission denied没有操作权限,改为赋予最高权限(777):
chmod 777 compile.sh
2 cuda 问题 报错:
unable to execute '/usr/local/cuda-9.0/bin/nvcc': No such file or directory找不到cuda下nvcc文件,需要找到自己的nvcc文件所在地,然后输入:
error: command '/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1
./compile.sh \ --export CUDA_HOME=/usr/local/cuda-8.0/bin
如果还不行,需要查看一下是否有nvcc:
nvcc --version
2.1 nvcc正常
若nvcc正常,设置cuda路径首先执行:
sudo vim ~/.bashrc
设置为:
export PATH=/usr/local/cuda-9.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
然后执行:
sudo vim /etc/profile
末尾添加:
export CUDA_HOME=/usr/local/cuda-9.0
export PATH=/MATLAB/R2016b/bin:/usr/local/cuda-9.0/bin:/anaconda3/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
然后执行
source /etc/profile
使链接生效
2.2 command not found
报错:
-bash: nvcc: command not found应该安装nvcc:
sudo apt-get install nvidia-cuda-toolkit
报错:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?升级apt-get update:
sudo apt-get update
报错:
Failed to connect to nvidia.github.io port 443: Connection timed out2.2.1 修改源 则应该修改源:
(1)修改前先做备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
(2)打开sources.list文件:
sudo vim /etc/apt/sources.list
替换为其他源:
清华源:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
阿里源:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
2.2.2 修改 nameserver 修改/etc/resolv.conf文件为:
nameserver 8.8.8.8
nameserver 4.2.2.2
3 not in the sudoers file 报错:
××× is not in the sudoers file. This incident will be reported.1.切换到超级用户root:
su root
2.查看/etc/sudoers权限:
ls -all /etc/sudoers
可以看到当前权限为744:
-r--r----- 1 root root 744 4月 16 20:36 /etc/sudoers3.更改权限为777(表示允许操作):
chmod 777 /etc/sudoers
4.编辑/etc/sudoers:
vi /etc/sudoers
5.在root ALL=(ALL:ALL) ALL 下面添加一行:
XXXALL=(ALL)ALL
其中
XXX
表示当前用户名6.把/etc/sudoers权限改回440:
chmod 440 /etc/sudoers
然后就可以切换回自己的用户操作了
4 ASSERT 报错:
ASSERT: "false" in file qasciikey.cpp, line 501OpenCV版本不对,没有里面没有tracker。安装contrib的OpenCV:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python
如果提示使用
--user
:pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-contrib-python
5 no commands supplied 报错:
no commands supplied应该将
python setup.py
改为 python setup.py install
。6 FileNotFoundError 报错:
[Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', /home/snowstorm/mmdetection']磁盘空间已满,清理空间。
学习更多编程知识,请关注我的公众号:
代码的路
【mmdetection训练数据遇到的问题】
文章图片
推荐阅读
- 9305|9305 传说之神 03days 作业#姚安小红书裂变涨粉训练营#
- C++文件的数据写入和文件的数据读取的方法实现
- Tech Talk · 云技术有话聊 | 带你了解Oracle数据库基础架构及原理
- PyTorch指定GPU进行训练
- Smartbi 数据模型以自助为理念,带来 “敏捷建模” 的新思路
- 使用python对图片进行写入数据库并从数据库中读取的操作
- 读|读 数据即未来 大数据的王者之道
- OpenShift|OpenShift 4 - 使用 Debezium 捕获变化数据,实现MySQL到PostgreSQL数据库同步
- 【铃铛子的训练营第一期】我画的肌理图和自选图
- 百亿数据百亿花, 库若恒河沙复沙,Go lang1.18入门精炼教程,由白丁入鸿儒,Go lang数据库操作实践EP12