本文介绍 云芯一号(rk3399) Arm微型服务器的python环境配置一些记录。
1.apt换国内源
备份系统原文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
编辑该文件
sudo vi /etc/apt/sources.list
删除原本内容,添加以下内容
#拷贝到文件中
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
更新源
sudo apt-get update
sudo apt-get upgrade
2.pip换国内源
安装pip,pip更换阿里源
#sudo apt-get install python-pip
sudo apt-get install python3-pip
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
#升级pip
python -m pip install --upgrade pip
将Python3设置为系统默认。
#sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
验证一下
python --version
#显示版本为3.x.x就说明切换成功
Python 3.6.9
时间不多写的少了点,下一篇写一些python中一些计算库和keras,tensoflow,onnx等框架及opencv的安装。
更多云芯一号的技术教程及评测报告请关注Arm微服务器专栏。