Note that there are some explanatory texts on larger screens.

plurals
  1. POtell pip to install the dependencies of packages listed in a requirement file
    primarykey
    data
    text
    <p>Developing a Django web app, I have a list of packages I need to install in a virtualenv. Say:</p> <pre><code>Django==1.3.1 --extra-index-url=http://dist.pinaxproject.com/dev/ Pinax==0.9b1.dev10 git+git://github.com/pinax/pinax-theme-bootstrap.git@cff4f5bbe9f87f0c67ee9ada9aa8ae82978f9890 # and other packages </code></pre> <p>Initially I installed them manually, one by one, along the development. This installed the required dependencies and I finally used <code>pip freeze</code> before deploying the app.</p> <p>Problem is, as I upgraded some packages, some dependencies are no longer used nor required but they keep being listed by <code>pip freeze</code>.</p> <p>Now, I'd like to set up a new virtualenv this way:</p> <ul> <li>put the needed packages (without their dependencies) in a requirement file, <br /> like <code>manual-requirements.txt</code></li> <li>install them with their dependencies <br /> <code>pip install -r manual-requirement.txt</code> (← problem, this does not install the dependencies)</li> <li>freeze the full virtualenv <br /> <code>pip freeze -r manual-requirements.txt &gt; full-requirements.txt</code><br /> and deploy.</li> </ul> <p>Any way to do this without manually re-installing the packages in a new virtualenv to get their dependencies ? This would be error-prone and I'd like to automate the process of cleaning the virtualenv from no-longer-needed old dependencies.</p> <p><strong>edit:</strong> actually, pip <em>does</em> install dependencies not explicitly listed in the requirement file, even if <a href="http://www.pip-installer.org/en/latest/requirements.html" rel="noreferrer">the documentation</a> tells us that such files are flat. I was wrong about which dependencies i expected to be installed. I'll let this question for anyone in doubt about pip not installing all dependencies. </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