Hey there,
I recently bought the new M1 Pro mac and it is giving me some trouble. I am new to frappe and I have followed the steps described in here but I keep getting the following error:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/homebrew/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/Users/danielmelchor/frappe-bench/apps/frappe/frappe/__init__.py", line 1707, in <module>
def log_error(message=None, title=_("Error")):
File "/Users/danielmelchor/frappe-bench/apps/frappe/frappe/__init__.py", line 71, in _
from frappe.translate import get_full_dict
File "/Users/danielmelchor/frappe-bench/apps/frappe/frappe/translate.py", line 21, in <module>
from frappe.model.utils import InvalidIncludePath, render_include
File "/Users/danielmelchor/frappe-bench/apps/frappe/frappe/model/utils/__init__.py", line 6, in <module>
from frappe.build import html_to_js_template
File "/Users/danielmelchor/frappe-bench/apps/frappe/frappe/build.py", line 17, in <module>
import psutil
File "/Users/danielmelchor/frappe-bench/env/lib/python3.9/site-packages/psutil/__init__.py", line 121, in <module>
from . import _psosx as _psplatform
File "/Users/danielmelchor/frappe-bench/env/lib/python3.9/site-packages/psutil/_psosx.py", line 15, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/Users/danielmelchor/frappe-bench/env/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 0x0002): tried: '/Users/danielmelchor/frappe-bench/env/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/_psutil_osx.cpython-39-darwin.so' (no such file), '/usr/lib/_psutil_osx.cpython-39-darwin.so' (no such file)
Usage: bench [OPTIONS] COMMAND [ARGS]...
Try 'bench --help' for help.
Error: No such command 'build'.
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/bench/commands/make.py", line 70, in init
init(
File "/opt/homebrew/lib/python3.9/site-packages/bench/utils/render.py", line 95, in wrapper_fn
return fn(*args, **kwargs)
[details="Summary"]
This text will be hidden
[/details]
File "/opt/homebrew/lib/python3.9/site-packages/bench/utils/system.py", line 93, in init
build_assets(bench_path=path)
File "/opt/homebrew/lib/python3.9/site-packages/bench/utils/bench.py", line 294, in build_assets
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
File "/opt/homebrew/lib/python3.9/site-packages/bench/utils/__init__.py", line 126, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
ERROR: There was a problem while creating frappe-bench
Any clues on how I can fix this? I suspect it has something to do with: mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')
but I have no idea of how to actually fix it… Any help is appreciated.
Thank you in advance.