工作整理,一起学习。
由于是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 等文件的内容,将用户名进行修改。
心态上的:遇到问题,勇敢求助!!