pipenvpipfile

Pipenv Won't Lock Library


I am trying to create a Pipfile.lock in my repo so I can run a Veracode scan. The version I use is: 2024.0.0 and I also have the most recent version of pip. I ran these commands:

pipenv install -r /path/to/requirements.txt

and

pipenv install --pre -r /path/to-requirements.txt

both say that it refuses to lock because there are "No matching distribution found for [library]." This is one of the libraries I am trying to use. I tried doing a pipenv install of the [library] and it doesn't find that either. I don't know how to proceed if Pipenv doesn't recognize a library that I need in my code. Any thoughts?


Solution

  • A few things that might help us :

    Note that a pipenv install genai-sdk doesn't work, it is not hosted on pypi. Is it a package from a private repository ?

    A few elements that could help you also in the use of Pipenv :

    Try first to see if the skip-lock mecanism is working also :

    pipenv install --skip-lock -r path/to/requirements.txt
    

    If it's not working, you might have an error into your requirements file.

    Either, if it's working, you might have a problem during the locking mecanism.

    Hence by doing a more verbose install command, we can get further information :

    pipenv install -vv -r path/to/requirements.txt