pip 卸载
python -m pip uninstall pip
pip 安装、升级
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install --user --upgrade pip
pip3 install --user --upgrade pip
卸载和安装python库
::查看已经安装的库,并把相关信息导入到txt文件
pip freeze > installed.txt
::读取txt文件,卸载所有文件中包含的库
pip uninstall -r installed.txt
::读取txt文件,安装所有文件中包含的库
pip uninstall -r installed.txt
virtualenv 环境部署
$: which python3
> /usr/bin/python3
$: pip install --user --upgrade pip
$: pip install virtualenv
$: virtualenv -p /usr/bin/python3 --no-site-packages venv
$: source venv/bin/activate
venv$: python --version
> python 3.5.2
$:deactivate
$: python --version
> Python 2.7.12
cd venv/Scripts/ & activate
cd venv/Scripts/ & deactivate