-
Notifications
You must be signed in to change notification settings - Fork 4
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
ERROR: Failed building wheel for fasttext #1
Comments
Hi, it seems the problem is with the dependency package "fasttext". Can you try installing it separately by using this command: If it fails, try installing the fasttext package differently: Tell me if it works for you. |
|
It might be related to a bit with easynmt: UKPLab/EasyNMT#89 Just to be sure, what version of python are you using, if you don't mind me asking? Also, I assume there is no opting out of |
I'm using Python 3.9.1 on Windows 11. I'll try installing the package on docker using 3.11.
Yes, EasyNMT is required for translation. |
The problem lies in the fastText package which is a dependency of EasyNMT. It requires usage of binary library and doesn't have pre-built binaries for each Python version and OS. So it tries to build one from source but fails, because your system has a newer compiler version which works a bit differently causing errors.
|
@daxida let me know if it worked for you. |
Sorry for the late response. Unfortunately it didn't work for me: I did run a Dockerfile where it seemed to work, so I'm unsure where the error is coming from. Edit: For context
Edit: The Works
Doesn't work (Still 13.2)
I'm not confident enough to identify what is happening. |
Strange, judging by your log it calls It is possible you need to do this: Then do this: I don't have much experience with gcc and make, so I'm not sure how it determines which compiler to choose. |
Now it does recognize the change but it still won't compile... because the compiler is unsupported. The key line being (I assume) this one:
Tough times. |
I couldn't reproduce it using Docker containers, so I don't know how to help you. The only fix I see is uninstalling all the gcc and g++ versions and then installing older versions (12). But I'm not sure if that would work and it might break something else. If you don't need translation to languages other than English, you can of course modify source code to remove dependency on EasyNMT or download an older commit. There's also the possibility of running the package inside the Docker container. I'll add the Dockerfile to the repository soon. |
I fixed it but I'm not sure how to reproduce :D As you can see, I have no alternatives anymore (I cleaned them manually via Now what I did just before (when I first realized that it worked, although since I can't reproduce it, it may be because I changed some other symlink that I can't identify) was just:
Again, I'm unsure as to why it works now but it does. Also, I intended to use the version without EasyNMT from the start but since I got that bug (that seems to be quite common looking at fasttext / EasyNMT issues), I figured out I might as well just open an issue here too. |
@daxida great, I'm glad it worked out for you! Judging by your log, it used a cache version of fasttext: So, it's possible you've built it before when you had gcc-12 installed. |
Oh that makes sense. Do you happen to know how can I get rid of a cached wheel? If I can delete I might be able to reproduce what fixed it. |
I believe |
But I did remove my venv last time. It shows in the first two lines of this pastebin
And also, are we sure that this cached version
doesn't just refer to the cached wheel (the uncompiled zip) that pip has stored in whatever repository it goes to fetch it? |
I believe pip stores global cache to speed up package installation in virtual environments. So you probably need to both clear cache and delete your virtual env.
Yes, it does mean cached wheel. No, cached wheel is not the uncompiled zip. wheel is a pre-built binary, that was created by running gcc/g++ on your machine. Usually those are created by package maintainers, however, fasttext repository is no longer maintained. Hence no wheels and no support for newer gcc versions. |
The commands I ran:
Here you can see the complete result of that command:
https://pastebin.com/nqUfJhW1
Tested in Ubuntu 23.10.
Version of the
venv
: Python 3.11.6I haven't tested the suggested
3.9
yet. I'm sorry if this ends up being the issue.The text was updated successfully, but these errors were encountered: