libfuse / python-fuse

Python 2.x/3.x bindings for libfuse 2.x
GNU Lesser General Public License v2.1
279 stars 73 forks source link

Is Mac OS supported? #42

Closed sarnobat closed 2 years ago

sarnobat commented 2 years ago

I'm having trouble figuring out if / how to use this on Mac OS X. When I've successfully run the docker build, it generates fuse_python-1.0.4-cp39-cp39-linux_x86_64.whl which I'm assuming isn't for Mac OS X.

It doesn't help that pip is completely broken on my system so I can't take shortcuts.

sarnobat commented 2 years ago

Actually I was able to get pip to install it:

Sridhars-MacBook-Air Sun 27 February 2022 11:30PM> SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib   CPATH=/Volumes/numerous/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ pip3 install fuse-python==1.0.4 2>&1
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting fuse-python==1.0.4
  Using cached fuse-python-1.0.4.tar.gz (49 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: fuse-python
  Building wheel for fuse-python (setup.py) ... done
  Created wheel for fuse-python: filename=fuse_python-1.0.4-cp39-cp39-macosx_10_15_x86_64.whl size=39276 sha256=31ee8f6876620950deb9cda22da9598df26314fc0a0a94881a8409d23787ae8d
  Stored in directory: /Users/sarnobat/Library/Caches/pip/wheels/50/66/8b/627a651fd4e12ef1f2d25aece48330473e7bd0b23bbabf95cd
Successfully built fuse-python
Installing collected packages: fuse-python
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed fuse-python-1.0.4
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/Volumes/numerous/usr/local/homebrew/Cellar/python@3.9/3.9.10/bin/python3.9 -m pip install --upgrade pip' command.

But I still get the same error when running the hello example:

python3 hello.py
...
ModuleNotFoundError: No module named 'fuseparts._fuse'
sdelafond commented 2 years ago

Only linux is supported, so that linux_x86_64 won't help on OSX.

sarnobat commented 2 years ago

Thanks for the quick reply. I guess in theory it should work on Mac OS X but you guys don't provide assistance (can you confirm is it impossible to work with Mac OS X?). No problem.

Note to self, on Ubuntu:

sudo apt install -y python3-fuse
mkdir /tmp/hi
python3 hello.py /tmp/hi
sarnobat commented 2 years ago

Solution

It works fine. But make sure you do not run python3 hello.py /tmp/hi from inside python-fuse.git/example. It finds some other module with the same name that hides /usr/local/homebrew/lib/python3.9/site-packages/fuse.py.

If you run it from anywhere else it works.