-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation from source leads to non-functional installation #37
Comments
@hboehmer868, I just tested this out and you are right! It's weird to be honest! Pip install should behave the same in both cases!! |
@abdeladim-s I have looked into it further and narrowed down the issue and its REALLY weird. My experiment setup is something like this:
This indicates to me that for some reason not the libwhisper.so from the installed wheel is used, but the libwhisper.so that is created in the build directory of the cloned repository. This also explains why straight installing from github does not work. There the repository is cloned in a temporary folder, the wheel is build and installed and then the temporary folder is deleted, removing the libwhisper.so that would be used. |
@abdeladim-s I am not too familiar with how the build and publish process to pypi works, but something with that is different, so that when i install a wheel from pypi the correct libwhisper.so (the one included in the wheel itself) is used. |
@abdeladim-s Okay I managed to build a truly self-contained wheel file by following the CI pipeline of this repository (good job setting that up properly). The CI pipeline uses cibuildwheel to build the wheels that get published to pypi. The docs of cibuildwheel describe which steps it goes through and this line in the docs lead me on the right track:
So I did the same manually with my previously build wheel file, et voila I was given a proper self contained wheel file. |
Hi, just dropping by to report that compiling from source using the latest git version of
Manually checking out and using |
Thanks a lot @hboehmer868 for tracking the issue. |
Hi @jfbvalenzuela, Do you mind to check what is the latest release of |
@abdeladim-s It does not seem to work for me, I am afraid. |
Commit Hope this helps! |
@hboehmer868 Can you please follow this and share the output wheel in the dist folder ? git clone --recursive https://github.com/abdeladim-s/pywhispercpp
cd pywhispercpp
git checkout eb22513c3524fe721e326665673395ad0a9d7cb7 # before the Whisper.cpp v1.6.2 update
pip install .
pip wheel . -w dist --no-deps |
@jfbvalenzuela, OK, I will try to update the wheels to the latest release as soon as possible. |
pywhispercpp-1.2.0-cp312-cp312-linux_x86_64.zip These are the contents of the wheel file as a zip archive. Github does not let me upload the wheel directly. I installed this wheel file with |
@hboehmer868, it seems that the generated wheel contains the lib folder with the shared libraries, so it should be working basically. |
@abdeladim-s Yes in colab it seems to work, even if you forgot to actually delete the build directory inside the pywhispercpp folder. I added it and removed it and it still worked.
|
What do you mean ? I even mentioned to delete the entire colab runtime, not just the build folder.
Yes, I already did the exact same steps before asking you to test it on your end, and it's working. I am not really sure what might be the issue, maybe the script you are testing with is still importing the Model class from the cloned repository rather than the one installed on site-packages. |
@abdeladim-s, apologies I misunderstood the "Download wheel + Delete Runtime + reupload wheel" line as a comment rather than an instruction. |
@hboehmer868, even the Colab file I sent didn't work for you ? That's weird! |
Same problem here. I came across this work a while back but I really needed CUDA support so waited until updates about CUDA support came up. In a fresh conda environment I get the same error after |
@dkakaie, can you please give this Colab a try and let me know whether it works or not ? I your virtual environment, please give the following a try as well: git clone --recursive https://github.com/abdeladim-s/pywhispercpp
cd pywhispercpp
WHISPER_CUDA=1 pip install . |
@abdeladim-s Both of them installed smoothly. |
OK, Thanks @dkakaie, The instructions on the README file are updated accordingly. |
@abdeladim-s Thanks for the great job. |
How to recreate:
Model
I have not quite wrapped my head around the issue but it seems that when installing a python package like this pip builds the wheel in the process and the
libwhisper.so
file is included in the python site packages. However the site package directory is by default not included in the LD_LIBRARY_PATH.However when i manually build the wheel after cloning the repository with
python -m build --wheel .
and install from the wheel file,libwhisper.so
is successfuly included and found on import.The text was updated successfully, but these errors were encountered: