Unable to install some packages on Jupyter Notebook

Question:
I cannot install some langchain packages in Jupyter Notebook replit. This is my replit.nix:

{ pkgs }: {
	deps = [
		pkgs.jupyter
        pkgs.jq
        pkgs.python3
        pkgs.python3Packages.pip
        pkgs.python3Packages.pandas
        pkgs.python3Packages.numpy 
        pkgs.python3Packages.langchain 
        pkgs.python3Packages.tiktoken 
        #pkgs.python3Packages.langchain_openai 
        #pkgs.python3Packages.langchain_community 
        #pkgs.python3Packages.langchain_core
        pkgs.python3Packages.pymupdf
        pkgs.python3Packages.qdrant-client
	];
  environment.systemPackages = [
    pkgs.python3Packages.langchain_openai
    pkgs.python3Packages.langchain_community 
    pkgs.python3Packages.langchain_core
  ];
}

And everything runs perfect but I cannot import langchain_openai, for example.
If run the replit with the packages on deps = [], I’ve the following error message:

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
         whose name attribute is located at /nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'REPLIT_LD_LIBRARY_PATH' of derivation 'nix-shell'

         at «string»:309:9:

          308|       {
          309|         REPLIT_LD_LIBRARY_PATH = (pkgs.lib.optionalString (env ? REPLIT_LD_LIBRARY_PATH) (env.REPLIT_LD_LIBRARY_PATH + ":")) +
             |         ^
          310|         pkgs.lib.makeLibraryPath deps;

       error: attribute 'langchain_openai' missing

       at /home/runner/notebooks/replit.nix:11:9:

           10|         pkgs.python3Packages.tiktoken
           11|         pkgs.python3Packages.langchain_openai
             |         ^
           12|         pkgs.python3Packages.langchain_community

sh: 1: jupyter: not found

I hope you guys can help me. Ty!

You can try visiting the Jupyter website (jupyter.org) and check if there is any information that is helpful. Also make sure if the notebook is installed in the shell. I’m not sure how to fix this but I recommend trying what I mentioned above. :slight_smile: