llm_engineering icon indicating copy to clipboard operation
llm_engineering copied to clipboard

Dependencies management improvement with Pipenv

Open Carbaz opened this issue 7 months ago • 0 comments

This PR first fis an issue on the requirements.txt as the Langchain package does not provides the docarray extra anymore.

  • WARNING: langchain 0.3.24 does not provide the extra 'docarray'

It's replaced directly with the docarray library.


Then it adds a new environment and dependencies management, Pipenv.

Pipenv comes like a sort of bundle for Pip and venv with extra control on dependencies version via a lock file.

It may sit between the Anaconda way, which is bulky and requires an extra and the bare Pip + Venv which is more complex and give no control on dependencies versions installed.

So with Pipenv you get on a single command-line command the ability to create an environment, access it and install all required dependencies.

Yes, there are other tools like Poetry, they are powerful but much more than required here and more complex to manage.

Several files has been added:

  • Pipfile: Dependencies definition and Python version to be used on the environment.
    Similar to the Anaconda's environment.yaml
  • Pipfile.lock: Specific versions lock file and its verification hashes.
    This file ensures everyone gets the same versions installed no matter when they download repository avoiding new version of a given library breaks the project.
  • SETUP-Pipenv.md: A documentation on how to install, deploy and use Pipenv.
    It's a generic document as it's usage is the same along different platforms, but may be included on each platform specific doc if preferred It also covers a possible issue while installing chromaDB that requires MSVC SDK.
  • fix-win-env-prefix/WindowsPowerShell/Microsoft.PowerShell_profile.ps1: A powershell profile fix to solve a possible issue that prevents the environment name prefix to appear on the terminal.

Carbaz avatar May 28 '25 21:05 Carbaz