[Python] Manually set package as installed in Python/pip

Discussão em 'Python' iniciado por Stack, Março 2, 2025.

  1. Stack

    Stack Membro Participativo

    I'm installing the openbabel package, and it can automatically generate the necessary Python libraries during compilation. This saves a good chunk of time, since installing from source via pip takes a few minutes, and that time can be rolled into the initial compilation.

    I've listed it as a requirement in my requirements.txt file, but when I go to install (pip install -r requirements.txt), it attempts to reinstall the openbabel Python library. When I run pip show or pip list, openbabel doesn't show up.

    Is there a way to manually mark a package as installed so pip thinks it's installed, even if it can't find the package? Or is there a file I can create that pip will use that will tell it openbabel is installed?

    Continue reading...

Compartilhe esta Página