paddlex 使用-8 Ubuntu下环境配置

环境使用18.04 LTS

1、准备工作
设置加速cdn 

cd /etc/apt
sudo cp sources.list sources.list.bak
sudo vim sources.list

   

删除文件内容再替换为以下内容,vim命令模式 GG dG 可清空

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

 

sudo apt-get update

 

2、安装python3.7,现在很简单,直接自动安装。

sudo add-apt-repository ppa:jonathonf/python-3.7
sudo apt-get install python3.7
sudo apt install python3-pip
pip install Cython  -i https://pypi.tuna.tsinghua.edu.cn/simple/

 安装完发现python版本还是3.6.9,需要执行软链接命令

 ln -sf /usr/bin/python3.7 /usr/bin/python

 

 

 同样,软链接pip命令

 ln -sf /usr/bin/pip3 /usr/bin/pip

 

 

 升级pip

 python -m pip install --upgrade pip

3、和之前一样 安装paddlex我这使用清华的加速稳定一些

pip install paddlex -i https://mirror.baidu.com/pypi/simple

目前这个版本基本不会安装成功,需要做下面两步骤

pip install numpy -i https://mirror.baidu.com/pypi/simple
然后再执行下面这个,因为2.0.2无法自动安装,这个我在ubuntu 20.0.4LTS下无法安装成功。
pip install pycocotools==2.0.0  

4、然后从新安装paddlex就可以安装成功了

 其它参考系列文章1

https://www.cnblogs.com/zhaogaojian/p/14025913.html  

 

posted @ 2020-11-27 21:17  zhaogaojian  阅读(466)  评论(0编辑  收藏  举报