-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Fix "OSError: Unable to find libfuse" on Windows and Optimized the code and fixed other bugs #993
Conversation
Great, before I knew it, I had modified so much code, hahaha😄 |
Why not use |
i think |
|
|
Worked for me. Thanks a lot. |
wtf is going here, PR was about fix windows error and now this guy refactoring whole repo 💀 |
Just Optimized the code and fixed other bugs |
why not merge PR |
I think you should do other PR for fixes and cleanup, or just rename this one |
like "major cleanup" or smth |
Yeah this should be like 2 or 3 different PR's. Maybe even more than that. I would say make a PR with only what is absolutely necessary for the libfuse fix and then make a separate PR with the rest of the optimizations. Generally you want to keep PR's as precise to the problem as possible. |
Yeah, this is a very bad PR. You need to separate "beautify", "cleanup" and "Fix for fuse". I will review it, but it will take some time. |
i dont know how to do
…---Original---
From: "Bjoern ***@***.***>
Date: Sun, May 12, 2024 17:03 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [bkerler/mtkclient] Fix "OSError: Unable to find libfuse" onWindows and Optimized the code and fixed other bugs (PR #993)
Yeah, this is a very bad PR. You need to separate "beautify", "cleanup" and "Fix for fuse". I will review it, but it will take some time.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Using this fix does not fix the issue for me. I am on Windows 11. This issue persists on the pr/993 branch as well as main, where it has been merged. I have also installed winfspy individually, but given that the dll's were included in the commit f8ced92, I figure that shouldn't be an issue. I also notice that rather it being an issue with 'libfuse' here it is just fuse itself, though the contents of the requirements.txt does include fusepy and I have ensured it is installed on my system. Does anyone have any insight as to what the issue might still be? ~\Documents\Applications\mtkclient> git pr 993 06/05/24 13:45:41 PM
Already on 'pr/993'
~\Documents\Applications\mtkclient> python mtk_gui 06/05/24 13:45:49 PM
Traceback (most recent call last):
File "C:\Users\admes\Documents\Applications\mtkclient\mtk_gui", line 18, in <module>
from mtkclient.Library.DA.mtk_da_handler import DA_handler
File "C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\DA\mtk_da_handler.py", line 12, in <module>
from mtkclient.Library.Filesystem.mtkdafs import MtkDaFS
File "C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem\mtkdafs.py", line 8, in <module>
from fuse import Operations, LoggingMixIn
ModuleNotFoundError: No module named 'fuse'
~\Documents\Applications\mtkclient> |
@anthonymesa What does |
That prints: PS C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem> python.exe -c "import os;print(os.environ.get('FUSE_LIBRARY_PATH'));print(os.name)"
None
nt So the FUSE_LIBRARY_PATH isn't already set, but I found when I was looking at mtkdafs.py earlier these lines: if not os.environ.get('FUSE_LIBRARY_PATH') and os.name == 'nt':
os.environ.setdefault('FUSE_LIBRARY_PATH', os.path.join(os.path.dirname(__file__), r"bin\winfsp-%s.dll" % ("x64" if sys.maxsize > 0xffffffff else "x86")))
from fuse import Operations, LoggingMixIn So I tried in the repl to ensure that the path being generated was created correctly (replacing FILE with getcwd), and it does seem to be creating the correct env variable: >>> print('FUSE_LIBRARY_PATH', os.path.join(os.getcwd(), r"bin\winfsp-%s.dll" % ("x64" if sys.maxsize > 0xffffffff else "x86")))
FUSE_LIBRARY_PATH C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem\bin\winfsp-x64.dll All of this said, I did find that after using PS C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem> pip3 uninstall fusepy
Found existing installation: fusepy 3.0.1
Uninstalling fusepy-3.0.1:
Would remove:
c:\python312\lib\site-packages\fusepy-3.0.1.dist-info\*
Proceed (Y/n)? y
Successfully uninstalled fusepy-3.0.1
PS C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem> pip3 install fusepy
Collecting fusepy
Using cached fusepy-3.0.1-py3-none-any.whl
Installing collected packages: fusepy
Successfully installed fusepy-3.0.1
PS C:\Users\admes\Documents\Applications\mtkclient\mtkclient\Library\Filesystem> python3
Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.executable)
C:\Users\admes\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe
>>> import fusepy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'fusepy' Even after re-installing it, fusepy specifically is not generating its proper package folder in site-packages, thus why it isn't being found. I am unsure how to resolve this going forward, as I do not primarily work with python nor am I well versed in pip. I did try to reinstall without cache, which also didn't work Thank you for your quick responses. |
Well, I did find that fusepy does seem to have installed, I was expecting a directory, but it is a file instead, I was alerted as I went to uninstall it, though even after verifying that file exists, I simply can not get python to import it.
|
I think you should rule out python issues by 1. use virtualenv or venv instead of system install and 2. use python 3.11 and not python 3.12 as the latter is the root for many issues right now |
That fixed it! Thank you so much for your time. |
This problem is also present on Mac OS, |
My bad. |
windows11 ,python3.11,
I have no idea,please help me.thank you. |
may be it was fixedby #1059 |
This error occurs on Windows when Winfsp is not installed, And Its only need two dlls to fix it