-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Windows DLL Weirdness #33
Comments
Tested on my Win 10 pro, with Python 3.9 (from Windows Store) and a venv. Worked with no issues, both with or without |
Closing because no action is required for the time being. |
I also encountered this error while using Python 3.8 (from Windows Store). Where can I find the fugashi DLL to manually download it? |
@alinacoding You can download it from PyPI. https://pypi.org/project/fugashi/#files Can you explain how you installed fugashi? Did you use pip, was it in Powershell or something else, etc. This really shouldn't happen so any hints are helpful. |
Note that maybe installing in a venv works, but installing globally does not. Not really sure though. (In general I would recommend always using venvs.) |
I used pip to install it on a Windows 64-bit machine, after I got the following error trace:
On a Ubuntu 16.04 64-bit machine the installation via pip went smoothly. Thank you for your suggestion, I will try using a venv. |
Thanks for the extra info! It definitely looks like pip is just being weird, no idea why that would happen.
That package is not maintained - the author moved development to |
Have the same issue, installed python 3.12 from the official site, default settings, Windows 10. |
Glad you figured it out, and sorry you had to deal with this. To be clear, while I still don't understand this very well, as far as I am aware it never happens if you use a virtualenv. Let me update the top of this ticket to summarize what I know. |
While it's easy to reproduce at least in my environment, I'll try to debug the installation this weekend to find out the reason. I'll keep you updated. |
Sometimes this error happens on Windows:
From experience, this can always be fixed by using a virtualenv. If you use a virtualenv and it does not work, please let me know. Using a virtualenv is the officially recommended workaround. Other environment managers should also work.
Normally when this happens, the dll has been installed, but Python is not looking in the right path for it. You can copy it to the right path to fix it, but I would recommend using a virtualenv instead.
The current status of this issue (2024-11-13) is that I cannot reproduce it, and I do not know what steps can be taken, if any, to prevent it from happening at the package level.
What follows is how I have tried to investigate this.
In order to resolve this issue, I will need either:
Ideally I would be able to test it myself, but if that is difficult, someone who has the issue and can test new package builds would be a big help.
What follows is the original text of this issue from 2021.
Via email I have a report of a Windows user who installed fugashi via pip without errors, but didn't get
libmecab.dll
in theirsite-packages/fugashi
directory, which led to errors at import time like this:For what it's worth, the dll is definitely in the wheel file, and when I install it on Windows the dll ends up in the
site-packages/fugashi
package as expected.This thread has some info on DLLs and Python on Windows:
Toblerity/Fiona#851
One thing that we could potentially do is check for ImportErrors, and if the code is being executed on Windows, check if
libmecab.dll
is present and give a very specific error if not. On the other hand, since it's not clear how this happened in the first place, maybe just having an FAQ entry (or this issue) is enough for now.The text was updated successfully, but these errors were encountered: