Skip to content

fasttext pybind11 wheel failure #597

@JeremyBickel

Description

@JeremyBickel

I ran into this problem trying to install extra packages (eg. txtai[all]). It requires and tries to build fasttext, but it fails due to not finding pybind11. I have pybind11. I have fasttext, correct version and everything, but it insists on trying to build it and it fails.

For reference in case someone else runs into this, here's how I fixed it. I found the wheel file and edited the metadata to exclude fasttext.

Find the pip cache directory> "pip cache dir"
Go there, and create a temp dir> "mkdir a"
Change to that directory> "cd a"
Unzip the wheel> "unzip ../txtai-6.1.0-py3-none-any.whl"
Rename the wheel file in case something goes wrong> "mv ../txtai-6.1.0-py3-none-any.whl ../txtai-6.1.0-py3-none-any.whl.bak"
Go into the .dist-info directory in the unzipped directory structure> "cd txtai-6.1.0.dist-info"
Edit the METADATA file> "vim METADATA" (or nano or any text editor)
Find all instances of fasttext (I found 4), and delete the whole line wherever you find it.
Save the file.
Back in the temp directory, repack the zip file into a wheel> "zip -r ../txtai-6.1.0-py3-none-any.whl ."
Install the wheel directly> "pip install ../txtai-6.1.0-py3-none-any.whl"

Will someone verify that this is a workable procedure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions