3

I currently have a conda environment tf_gpu and I pip installed pipreqs in it to auto generate requirements.txt

Now, in my project folder, I have app.py with the imports :

import os
from dotenv import load_dotenv
from flask import Flask, request
from predict import get_recs
import urllib.request

Also, predict uses pandas, scipy, numpy, pickle

So, but the requirements.txt generated by pipreqs using pipreqs ./ inside the project folder only gets me the following:

Flask==2.1.3
numpy==1.23.3
pandas==1.4.4
scipy==1.9.1

Why is python-dotenv not included? It isnt a standard library right? So what's happening here?

Techie5879
  • 516
  • 1
  • 5
  • 13
  • 1
    No idea. This question is probably out of scope for StackOverflow anyway. You can ask on [_`pipreqs`_ ticket tracker](https://github.com/bndr/pipreqs/issues). Maybe you can also try with [_`pigar`_](https://pypi.org/project/pigar/) instead. – sinoroc Oct 10 '22 at 12:58
  • Was `python-dotenv` installed with `conda`? Are you sure `pipreqs` lists packages installed with `conda`? – phd Oct 10 '22 at 14:10
  • pipreqs should list packages installed with conda – jeffhale Dec 13 '22 at 14:22
  • pipreqs does miss packages, and will also add non-sensical ones. – Fabien Snauwaert Feb 11 '23 at 11:54

1 Answers1

4

According to the open issues in the GitHub repo, some packages don't map well. You could try opening an issue for this package.

jeffhale
  • 3,759
  • 7
  • 40
  • 56