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
输入密码即可: