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.61k stars 90 forks source link

The following module(s) are not found yet: #179

Open bitjerry opened 9 months ago

bitjerry commented 9 months ago

Describe the bug When I use Pigar in a pipenv environment, it show The following module(s) are not found yet: However, all packages have been correctly installed with pipenv.

To Reproduce Steps to reproduce the behavior:

pipenv shell
pigar generate

Expected behavior

Pigar should recognize these packages installed in the pipenv virtual environment, rather than going to pypi to retrieve them again .

Context (Environment)

Additional context Add any other context about the problem here.

pigar -l DEBUG [command] will give you debug level logs.

damnever commented 9 months ago

I believe you should ensure that pigar recognizes your virtual environment. This implies that you may need to install pigar in your virtual environment.

bitjerry commented 9 months ago

Is it possible for pigar to be automatically recognized, if I install it globally, and execute this program under pipenv shell? Alternatively, pipenv can add a specified local index path. For example, specify .venv/Lib/site-packages

I believe you should ensure that pigar recognizes your virtual environment. This implies that you may need to install pigar in your virtual environment.

damnever commented 9 months ago

I've been away from the world of Python for quite some time, but I believe you can execute pigar like this: python -m pigar.

damnever commented 9 months ago

Or maybe not..