共计 1170 个字符,预计需要花费 3 分钟才能阅读完成。
1 概述
Debian10
装置MyCLI
。
环境:
Debian10
Python3.7
2 筹备环境
2.1 Python
首先确保装置了Python
:
apt install python3
若是没有换源倡议先换源,这里列出了阿里的源:
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib | |
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib | |
deb http://mirrors.aliyun.com/debian-security buster/updates main | |
deb-src http://mirrors.aliyun.com/debian-security buster/updates main | |
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib | |
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib | |
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib | |
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib |
应用:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
sudo vim /etc/apt/sources.list |
把源复制过来即可。
装置实现后能够加个软链:
sudo ln -s /usr/bin/python /usr/bin/python3
2.2 pip
同时须要装置pip
:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
sudo python get-pip.py |
装置实现后能够先测试一下:
pip --version
接着为 pip
换源,先创立 ~/.pip
目录,在创立 ~/.pip/pip.conf
文件:
mkdir ~/.pip | |
cd ~/.pip | |
vim pip.conf |
输出如下内容:
[global] | |
index-url = https://pypi.tuna.tsinghua.edu.cn/simple | |
[install] | |
trusted-host = https://pypi.tuna.tsinghua.edu.cn |
能够应用 pip config list
查看是否存在镜像:
3 装置MyCLI
pip install mycli
应用:
mycli -u USERNAME
输出明码即可:
正文完