-
Notifications
You must be signed in to change notification settings - Fork 731
Description
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?