推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
yxcoder
V2EX  ›  Python

Python 第三方包同步机制是什么

  •  
  •   yxcoder · Dec 3, 2019 · 4068 views
    This topic created in 2534 days ago, the information mentioned may be changed or developed.
    本人前端,最近在学 python。

    nodejs 里面是用 package.json,npm install 就可以下载所有 save 的第三方包了。

    然后想了解下 python 里面一般是用什么方式来同步第三方包的?
    11 replies  •  2019-12-03 12:18:00 +08:00
    dongyulin353
    dongyulin353
    Dec 3, 2019
    1
    pip
    bmos
    bmos
    Dec 3, 2019
    2
    下载包:pip install package
    导出包列表:pip freeze > requirements.txt
    按照包列表安装包:pip install -r requirement.txt
    yxcoder
    yxcoder
    OP
    Dec 3, 2019
    3
    @bmos 多谢,顺便问一下,python 里面针对当前项目所使用的包,有办法导出吗?
    Les1ie
    Les1ie
    Dec 3, 2019
    5
    我一般手写 requiremets.txt
    renmu
    renmu
    Dec 3, 2019 via Android
    6
    用虚拟环境
    Clay0620
    Clay0620
    Dec 3, 2019
    7
    之前用过 pipenv,但是遇到几次 lock 的时候卡了好久,现在还是用 requirements.txt 管理了
    bmos
    bmos
    Dec 3, 2019
    8
    @yxcoder 第二个不就是导出项目使用的包?配合虚拟环境使用。
    Trim21
    Trim21
    Dec 3, 2019 via Android
    9
    推荐 poetry,不推荐 pipenv
    inhzus
    inhzus
    Dec 3, 2019 via Android
    10
    virtualenv + requirements
    qcts33
    qcts33
    Dec 3, 2019
    11
    同推荐 poetry,至少我自己用得比较顺手
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2574 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 11:43 · PVG 19:43 · LAX 03:43 · JFK 06:43
    ♥ Do have faith in what you're doing.