【脚本语言系列】关于Python安装代码包,你需要知道的事

来源:互联网 发布:qt淘宝互刷房间 编辑:程序博客网 时间:2024/06/09 22:16

如何安装Python代码包

从源代码安装

  1. 下载源代码
  2. 解压缩
  3. setup.py所在的目录下运行
python install setup.py

使用包管理器

OS X

  • OS X homebrew

    http://brew.sh/

  • OS X ports

    http://www.macports.org/

Linux

  • linux apt-get
  • linux yum
  • linux dpkg
  • linux zypper

Windows

  • msi

使用pip

  • pip install flask
  • pip install flask==0.9.0
  • pip install “flask>=0.9.0”
  • pip -r requirements.txt
    requirements.txt
flask==0.9.0djangopsycopg2
阅读全文
0 0