Installing a Python Package with Flox that has a Dependency Not Included in the set of Nix Python Packages

I am trying to install the pinecone-client Python package for Python3.12. When I ran flox install python312Packages.pinecone-client I ran into the following error.

Successfully built pinecone_client-4.1.1-py3-none-any.whl
Finished creating a wheel...
evaling implicit 'postBuild' string hook
/build/pinecone_client-4.1.1/dist /build/pinecone_client-4.1.1
Unpacking to: unpacked/pinecone_client-4.1.1...OK
Repacking wheel as ./pinecone_client-4.1.1-py3-none-any.whl...OK
/build/pinecone_client-4.1.1
Finished executing pypaBuildPhase
@nix { "action": "setPhase", "phase": "pythonRuntimeDepsCheckHook" }
Running phase: pythonRuntimeDepsCheckHook
Executing pythonRuntimeDepsCheck
Checking runtime dependencies for pinecone_client-4.1.1-py3-none-any.whl
  - pinecone-plugin-interface not installed

It appears that pinecone-plugin-interface could not be installed because it’s not included in Nix, but I can see it on pypi (pinecone-plugin-interface · PyPI). I know I can probably resolve this by using pip/poetry/pdm, but is there a better way to solve this?

we’re taking a look! I can reproduce this

1 Like

as a workaround, you can install this by flake reference…but it’s 4.1.0…there does seem to be problems with this package upstream in nixpkgs:

flox install 'github:nixos/nixpkgs?ref=nixos-24.05#python312Packages.pinecone-client'

edit: yeah, something is specifically wrong with that version in nixpkgs. also works: flox install python312Packages.pinecone-client@python3.12-pinecone-client-4.1.0

Hey Max, thanks for taking a look. You found a rare package that’s broken in nixpkgs!

1 Like

Hey Max I just did some poking around re: your Jupyter issue and I think we just aren’t setting the JUPYTER_PATH variable: Common Directories and File Locations — Jupyter Documentation 4.1.1 alpha documentation

If you want to poke around yourself, you may try setting that variable in your manifest (I don’t actually know where notebook extensions get installed e.g. site-packages or somewhere else). We can probably take a look ourselves in the near future, but if you just wanted to do some research yourself, that’s where I would start.

1 Like

The $FLOX_ENV variable points at the directory that contains all the executables, libraries, etc for your environment, and you should have a symlink to that same path in your .flox/run directory.

1 Like

Thanks for looking into this, @zmitchell! I’ll give it another shot

I created a new issue for the discussion related to jupyter notebook extensions: Issues Using Jupyterlab Extensions with Flox