maphew

Minimal requirements.txt

if you also need a way to figure what to put in requirements.in , you can first use pip-chill to find the minimal set of required packages you have . By combining these tools, you can show the dependency reason why each package is installed. The full cycle looks like this: 

  1. Create virtual environment: 
    $ python3 -m venv venv 
  2. Activate it: 
    $ . venv/bin/activate 
  3. Install newest version of pip, pip-tools and pip-chill: 
    (venv)$ pip install --upgrade pip 
    (venv)$ pip install pip-tools pip-chill 
  4. Build your project, install more pip packages, etc, until you want to save... 
  5. Extract minimal set of packages (ie, top-level without dependencies): 
    (venv)$ pip-chill --no-version > requirements.in 
  6. Compile list of all required packages (showing dependency reasons): 
    (venv)$ pip-compile requirements.in 
  7. Make sure the current installation is synchronized with the list: 
    (venv)$ pip-sync 

From < https://stackoverflow.com/questions/10333814/tell-pip-to-install-the-dependencies-of-packages-listed-in-a-requirement-file

thanks to @krubo. 

-------------------------

you can also have just . w/o -e inside requirements.txt . This method just delegates all the requirements to setup.py and you don't need to force anybody into the editable mode. Users can still do pip install -e . if they want to. – stason 

From < https://stackoverflow.com/questions/43658870/requirements-txt-vs-setup-py