rednotebook
rednotebook copied to clipboard
Cannot install RedNotebook on Mac
Mac OS Mojave. Python 3.7.4. Python versions managed with pyenv.
I tried to follow all installations steps at:
- https://github.com/jendrikseipp/rednotebook/blob/master/dev/mac-homebrew.txt
- https://gist.github.com/pmgreen/a1bf2c7015cb2a70d73e5e66bb84885e
and keep getting the same error
ERROR pygobject could not be imported: "No module named 'gi'". Please install it (python3-gi)
The relevant library for this missing package seems to be: pygobject3
. I did install it successfully with brew install pygobject3
. Also tried brew install pygobject3 --with-python@3
. brew list
shows pygobject3
as installed. Also when using pip3 list
the packagePyGObject 3.42.0
is installed.
Tried fresh reinstall multiple times, the same error keeps coming up. Looked up this question on StackOverflow as relevant to the issue (someone in the comment also mentions rednotebook). This did not help. https://stackoverflow.com/questions/18119618/importerror-no-module-named-gi-repository-mac-os-x/33192698?noredirect=1#comment123969775_33192698
Please, seeking instructions on how to install this on mac successfully. It's a great piece of software but don't know how to get around this issue.
I also don't know more about this, sorry. I recommend creating a test.py
file that only contains import gi
and see if the more detailed error message tells you what's going wrong.
@jendrikseipp I managed to bundle rednotebook for mac os x using pyinstaller. The result is an rednotebook.app that can be copied to the application folder. There is still an issue with keyboard shortcuts, that I am not sure how to resolve.
Installation and bundling got much simpler (and more sustainable) than my previous solution!
Read about it here:
https://blog.jarrousse.org/2022/10/19/packaging-rednotebook-for-mac-os-x-with-pyinstaller
I am thinking about creating a pull request, to add the configuration if you are open to reviewing it.
I am still facing an issue with keyboard shortcuts mapping. I don't know how to address that issue. I've created a stackoverflow and a apple stackexchange questions about it:
https://stackoverflow.com/questions/74184371/gtk3-application-running-on-mac-os-x-does-not-have-the-same-keyboard-shortcuts
https://apple.stackexchange.com/questions/449522/gtk3-application-running-on-mac-os-x-does-not-have-the-same-keyboard-shortcuts
You could also have a look at how similar GTK 3 tools do this on MacOS, such as Gaphor or Gramps.
I made some progress on building a DMG for RedNotebook automatically in a feature branch: https://github.com/jendrikseipp/rednotebook/pull/647
The .app and .dmg files are uploaded as artifacts here: https://github.com/jendrikseipp/rednotebook/actions/workflows/macos.yml (select the newest workflow run, to see/test them).
There are two main problems currently:
- I don't have a Mac for testing the .app and .dmg file.
- Distributing the .dmg file would require an Apple developer license (USD 99 per year) for notarizing the file, which I don't have.
Any help/tips appreciated :-)