damnever / pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)

Home Page:https://damnever.github.io/pigar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The following module(s) are not found yet:

bitjerry opened this issue · comments

commented

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)

  • OS: Windows
  • Version of Python: 3.11.0
  • Version of pigar: 2.1.1

Additional context
Add any other context about the problem here.

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

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

commented

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.

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.

Or maybe not..