Skip to content

Generating and using a .pyi without "installing" the module in question? #227

Closed
@jandyman

Description

@jandyman

It seemed to me that from the documentation that I would just open a terminal and say the following to generate the pyi file:

pybind11-stubgen pybind_streaming

Provided that the module is in the current directory. But I get:

ModuleNotFoundError: No module named 'pybind_streaming'

The .so is in the current folder and the full filename is pybind_streaming.cpython-312-darwin.so

It seems I don't understand something very basic. What can I read to straighten my head out? Can .pyi files not be generated for modules that are not installed? I'm still developing the pybind module so it doesn't make sense to install it yet.

I don't use cmake to build my pybind11 modules anymore, due to a weird cmake bug on MacOS. I now use a makefile. That is when all my autocompletion stopped working in ipython, and I'm assuming it has to do with a missing pyi file based on a stack overflow inquiry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions