gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

OSX Instructions #267

Open agzam opened 5 months ago

agzam commented 5 months ago

Can someone please share how they do it on a Mac? I have to use a Mac (not by choice) and with every update something Python-related breaks in the system. This time it was the latest Sonoma patch. I can never get the notmuch2 bindings installed properly. I would appreciate it if someone shared their workaround for Mac. Thanks.

Log excerps Building wheels for collected packages: lieer, notmuch2 Building wheel for lieer (setup.py) ... done Created wheel for lieer: filename=lieer-1.6-py3-none-any.whl size=47110 sha256=0e07f2c606f06e52e7e0bcbf0c1a2858f72dcc1f2ecf7bbd07fe5cccce87e101 Stored in directory: /private/var/folders/v9/jfn5y8zd2xn06ggtrjxnrnq40000gn/T/pip-ephem-wheel-cache-1j2mmaky/wheels/08/4c/77/6a2b7e035ac8e9c5cdab9ab7cee273b2a43683cd69f707c359 Building wheel for notmuch2 (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [38 lines of output] /opt/homebrew/lib/python3.11/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. ******************************************************************************** !! dist.fetch_build_eggs(dist.setup_requires) running bdist_wheel running build running build_py creating build creating build/lib.macosx-14-arm64-cpython-311 creating build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_base.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_errors.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_query.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/__init__.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_build.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_database.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_message.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_config.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_thread.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 copying notmuch2/_tags.py -> build/lib.macosx-14-arm64-cpython-311/notmuch2 running build_ext generating cffi module 'build/temp.macosx-14-arm64-cpython-311/notmuch2._capi.c' creating build/temp.macosx-14-arm64-cpython-311 building 'notmuch2._capi' extension creating build/temp.macosx-14-arm64-cpython-311/build creating build/temp.macosx-14-arm64-cpython-311/build/temp.macosx-14-arm64-cpython-311 clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I../../lib -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c build/temp.macosx-14-arm64-cpython-311/notmuch2._capi.c -o build/temp.macosx-14-arm64-cpython-311/build/temp.macosx-14-arm64-cpython-311/notmuch2._capi.o build/temp.macosx-14-arm64-cpython-311/notmuch2._capi.c:572:14: fatal error: 'notmuch.h' file not found #include ^~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output]
gauteh commented 5 months ago

I generally recommended miniforge. Make a separate notmuch environment.

paralin commented 5 months ago

notmuch.h is not available on MacOS, not sure how to get the dev header installed.

rhstanton commented 1 month ago

I had the same problem. Then I tried uninstalling the MacPorts version of notmuch and installing the Homebrew version instead (brew install notmuch) and lieer installed fine.

rhstanton commented 1 month ago

Here are step-by-step instructions. Note that the default Python installation is now 3.12, which doesn't seem to work with leeir, so I specify 3.10 below:

And you should be done!

listx commented 1 month ago

I generally recommended miniforge. Make a separate notmuch environment.

Could you provide some explicit instructions about making this work?

gauteh commented 1 month ago

I usually recommend this guide which has specific instructions for each platform: https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html

You want micromamba.

tor. 18. apr. 2024, 07:28 skrev Linus Arver @.***>:

I generally recommended miniforge. Make a separate notmuch environment.

Could you provide some explicit instructions about making this work?

— Reply to this email directly, view it on GitHub https://github.com/gauteh/lieer/issues/267#issuecomment-2063028782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN367RQANRTSP4EJCQ5A3Y55KXRAVCNFSM6AAAAABADCEUZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRTGAZDQNZYGI . You are receiving this because you commented.Message ID: @.***>

listx commented 1 month ago

@gauteh Thanks. I actually got lucky and realized that lieer is already packaged in Nixpkgs https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/applications/networking/lieer/default.nix#L34 so I just installed that on OSX (e.g., nix-env -iA nixpkgs.lieer) and it's working. Cheers

gauteh commented 1 month ago

Glad to hear it!

On Thu, Apr 18, 2024 at 9:17 AM Linus Arver @.***> wrote:

@gauteh https://github.com/gauteh Thanks. I actually got lucky and realized that lieer is already packaged in Nixpkgs https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/applications/networking/lieer/default.nix#L34 so I just installed that (e.g., nix-env -iA nixpkgs.lieer) and it's working. Cheers

— Reply to this email directly, view it on GitHub https://github.com/gauteh/lieer/issues/267#issuecomment-2063187587, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN3674SB3PSS7QDYKHMB3Y55XSLAVCNFSM6AAAAABADCEUZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRTGE4DONJYG4 . You are receiving this because you were mentioned.Message ID: @.***>

HomoElectromagneticus commented 3 weeks ago

I am also having trouble with this on MacOS. By checking out v1.3, I was able to install lieer, however I was unable to pull in email due to an error at the 2FA step with Google. Trying to install the latest version produces the same error for me as in agzam's original message here. I'm not familiar with the python / conda / mamba ecosystem or virtual environments in general, and thus my attempts at figuring it out on my own have been unsuccessful. Any assistance would be very appreciated - thanks!