I've been scratching my head (googling, chatgpt-ing) trying to figure out why I can't generate a pyi file for a pybind module with pybind11-stubgen. I did this about a year ago successfully but can't remember the specifics. I'm getting a "No Module Named {my-pybind-module}" error when I try running pybind11-stubgen in a terminal window. Then it occurred to me (and it rings a memory bell) that maybe the pybind module needs to be "installed" in my environment in order for this to work. These are ad hoc pybind11 modules I'm building - I can successfully import and use them from python, but I wouldn't normally install them in my environment. Do I need to do this in order to run pybind11-stubgen successfully? And if so, what is the simplest and easiest way to do this? These are just private modules, rebuilt very frequently during development - putting some together some kind of package that can be used with pip seems like overkill. Continue reading...