1、fava在新电脑(M1)上不能用(一个python记账软件),一直没有fix,今天有时间,fix了一下。
2、最终还是跟根据 https://docs.google.com/document/d/1FqyrTPwiHVLyncWTf3v5TcooCu9z5JRX8Nm41lVZi0U/edit 中的提示,sudo -H python3 -m pip install beancount
安装成功。
1. So the -H flag makes sudo assume root's home directory as HOME instead of the current user's home directory.
2. python -m: 将模块当做脚本来运行
3.
3、使用pip3 uninstall beancount, pip3 install beancount, pip3 uninstall fava, pip3 install fava 均可以安装成功,但是运行会报错:
Traceback (most recent call last):
File "/opt/homebrew/bin/fava", line 5, in <module>
from fava.cli import main
File "/opt/homebrew/lib/python3.10/site-packages/fava/cli.py", line 13, in <module>
from fava.application import app
File "/opt/homebrew/lib/python3.10/site-packages/fava/application.py", line 43, in <module>
from fava import template_filters
File "/opt/homebrew/lib/python3.10/site-packages/fava/template_filters.py", line 25, in <module>
from fava.context import g
File "/opt/homebrew/lib/python3.10/site-packages/fava/context.py", line 6, in <module>
from fava.core import FavaLedger
File "/opt/homebrew/lib/python3.10/site-packages/fava/core/__init__.py", line 41, in <module>
from beancount.loader import _load # type: ignore
File "/opt/homebrew/lib/python3.10/site-packages/beancount/loader.py", line 26, in <module>
from beancount.parser import parser
File "/opt/homebrew/lib/python3.10/site-packages/beancount/parser/parser.py", line 119, in <module>
from beancount.parser import _parser
ImportError: dlopen(/opt/homebrew/lib/python3.10/site-packages/beancount/parser/_parser.cpython-310-darwin.so, 0x0002): tried: '/opt/homebrew/lib/python3.10/site-packages/beancount/parser/_parser.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
beancound只支持python3,不支持python。
转载请注明:牛哥678 » 解决了Mac M1上,fava的使用问题