-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Having trouble installing libraqm #8232
Comments
The code is a bit of a mess because it's for a discord bot that gets text and sends it using a font that is designed to write in a language that me and some friends made up. The issue here is that that language needs to use ligatures to work, but I can't do that without libraqm and I can't get it installed |
Hi. pip is for installing Python libraries, and libraqm is not a Python library. So that's why pip fails to install it. I notice 'nix' in your output. Does that mean you're using nixpkgs? If so, https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=raqm might help you install libraqm. After that, try uninstalling and installing Pillow again. |
I'll try, thanks |
@laggron42 as the other person who most recently created a nix issue, are you able to offer any guidance? |
oh it says: couldn't get nix env building nix env: exit status 1 |
This appears so be Replit's documentation for installing packages: https://docs.replit.com/replit-workspace/dependency-management#:~:text=To%20install%20additional%20packages%20in,replit%20file. It seems that you may be able to install system packages by using the Perhaps you should try to install libraqm there. However, from the |
then how can I install fribidi? |
I'd suggest the |
I've installed it I think, but still not working. Replit AI tells me to install a pillow wheel with libraqm in it. I don't even know what a wheel is 😅, but is that possible to do? I just want ligatures to be able to be rendered 😫 |
You'd need to build your own which is very likely to be more complicated. |
hmmm, and do you know what else can I do? I could use something else than replit, maybe I could try using vsc, I just use replit cause is very convenient to work with |
I have this in the code: from PIL import features
print(features.check('raqm')) and every time I run it it prompts False |
Assuming you installed it, I would expect Have you tried restarting the replit instance or something like that? I'm also wondering if there is an environment variable missing. You could also consider asking for help on the Replit forum.
Do you mean VS Code? I think that could be easier since it would be running on your system (as I understand it Replit runs in the cloud, with limited documentation on their system). We probably have more experience here helping people install libraqm/fribidi in a local environment. |
Yes, VS Code, I have it installed, so if you could teach me how to install libraqm or fribidi or whatever I have to install in order for it work I could also try it there |
Please do this in VS Code then. |
|
RAQM is marked as not installed as well |
It looks like you are using UWP Python, so this is going to be a bit more complicated than usual on Windows. First, download fribidi-windows-AMD64 and extract Now you need to place it in a location that will be searched by Windows; because you are using UWP Python that is the Standard search order for packaged apps. Typically I would recommend using the "The folder the calling process was loaded from (the executable's folder)" entry, but because of Windows Store security restrictions, you would need to have TrustedInstaller rights to do that. There are only three other options:
If you weren't using UWP Python, you could also add the code of either of the last two options to your |
I don't really get it... I tried the two last options (you said the first one could cause problems) but just nothing happens, I run the code and everything looks the same. I didn't know I was using UWP python so I wouldn't mind changing my Python version |
SolutionUpdate: Someone in a discord server found a solution (I think it's literally what you told me but I didn't quite get). Basically I had to uninstall microsoft store's Python and install it through the official web. Then I just had to add the fribidi.dll file downloaded here fribidi-windows-AMD64 in the folder python was installed in. |
I only hinted at it, but did not say it explicitly. 😄
(and I couldn't reply to this comment with the full explanation because I wasn't at my computer)
FWIW I did test that exact code with UWP Python 3.10 (i.e. same as what you had) and it worked, so I suspect you had something importing Pillow before those lines. But I suppose it doesn't matter anymore since you have regular Python installed now. |
Will future standard Pillow installation include libraqm and fribidi by default, or is there a better solution than the manual workaround? |
There has been a recent suggestion of switching to SheenBiDi instead of FriBiDi - #8497 (comment). I expect that would improve the situation. |
What did you do?
I am trying to install libraqm. I'm using Replit and I managed to install pillow, but when I try to use kern or liga as font features i am prompted an "Unable to use features without libraqm" error, so I tried to install it using "pip install libraqm" but that didn't work. I know very little about python and programming in general, so please be specific with me.
What did you expect to happen?
I expect the libraqm lib to be installed with no problem but it turned out to be more complex than a command in the shell.
What actually happened?
~/$ pip install libraqm
ERROR: Could not find a version that satisfies the requirement libraqm (from versions: none)
ERROR: No matching distribution found for libraqm
What are your OS, Python and Pillow versions?
The code runs perfect as it is, but when I change features=None to features="kern" or features="liga" it prompts this error:
The text was updated successfully, but these errors were encountered: