Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen to use pip requirements file versus install_requires in setup.py?
    primarykey
    data
    text
    <p>I'm using pip with virtualenv to package and install some Python libraries. </p> <p>I'd imagine what I'm doing is a pretty common scenario. I'm the maintainer on several libraries for which I can specify the dependencies explicitly. A few of my libraries are dependent on third party libraries that have transitive dependencies over which I have no control.</p> <p>What I'm trying to achieve is for a <code>pip install</code> on one of my libraries to download/install all of its upstream dependencies. What I'm struggling with in the pip documentation is if/how <a href="http://www.pip-installer.org/en/latest/cookbook.html#requirements-files" rel="noreferrer">requirements files</a> can do this on their own or if they're really just a supplement to using <code>install_requires</code>.</p> <p>Would I use <code>install_requires</code> in all of my libraries to specify dependencies and version ranges and then only use a requirements file to resolve a conflict and/or freeze them for a production build?</p> <p>Let's pretend I live in an imaginary world (I know, I know) and my upstream dependencies are straightforward and guaranteed to never conflict or break backward compatibility. Would I be compelled to use a pip requirements file at all or just let pip/setuptools/distribute install everything based on <code>install_requires</code>?</p> <p>There are a lot of similar questions on here, but I couldn't find any that were as basic as when to use one or the other or using them both together harmoniously.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload