Optional dependencies in a pip requirements file

前端 未结 3 537
旧巷少年郎
旧巷少年郎 2020-12-13 12:33

How can I specify optional dependencies in a pip requirements file?

According to the pip documentation this is possible, but the documentation doesn\'t explain how t

3条回答
  •  死守一世寂寞
    2020-12-13 13:23

    You are misunderstanding the documentation; it's not as clear as it could be. The point in the documentation is that with a requirements file you can feel free to specify your full recommended working set of packages, including both necessary dependencies and optional ones.

    You can add comments (lines beginning with #) to distinguish the two to humans, but pip makes no distinction. You can also have two requirements files, as Daniel suggests.

提交回复
热议问题