damnever / pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)
https://damnever.github.io/pigar/
BSD 3-Clause "New" or "Revised" License
1.67k stars 90 forks source link

pigar unable to recognize html5lib #84

Closed shravanasati closed 3 years ago

shravanasati commented 3 years ago

So this is the code snippet I was working with:

from bs4 import BeautifulSoup
import requests

r = requests.get("some-url")
soup =BeautifulSoup(r.content, "html5lib")
...

When I later generated requriements.txt with pigar, bs4 and requests were there, but not the parser html5lib.

damnever commented 3 years ago

You can import it explicitly to resolve this issue.

I don't see a simple solution for this, since analyzing the dependencies of dependencies is complicated and we can not execute users' program safely to do some magical things.

damnever commented 3 years ago

I recommend you try some package management tools, pigar isn't one.