管理 python 包

作者: 清醒的cola | 来源:发表于2017-02-17 22:09 被阅读31次

开始

配置文件存放位置:

  1. On Unix and macOS the configuration file is:
    $HOME/.pip/pip.conf
  2. On Unix and macOS the file is:
    $VIRTUAL_ENV/pip.conf

更新配置文件 pip.conf(阿里镜像加速)

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

更新 pip

pip install -U pip 

更新 django 版本

pip install --upgrade pip #pip更新django版本
pip install -U Django==1.8.15

添加依赖

pip freeze > requirements.txt # 制作requirements.txt
pip install -r requirements.txt # pip安装软件

感谢阿里提供的镜像

相关文章

网友评论

    本文标题:管理 python 包

    本文链接:https://www.haomeiwen.com/subject/zyslwttx.html