I recently upgraded ubuntu to 21.04. Now bench does not work. It has to do with the python version. My version is now 3.9.5
Is it possible to get bench working without scrapping everything? This is the error message we get.
Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/usr/lib/python3.8/runpy.py”, line 111, in get_module_details
import(pkg_name)
File “/srv/bench/frappe-bench/apps/frappe/frappe/init.py”, line 1658, in
def log_error(message=None, title=(“Error”)):
File “/srv/bench/frappe-bench/apps/frappe/frappe/init.py”, line 67, in _
from frappe.translate import get_full_dict
File “/srv/bench/frappe-bench/apps/frappe/frappe/translate.py”, line 19, in
from frappe.model.utils import InvalidIncludePath, render_include
File “/srv/bench/frappe-bench/apps/frappe/frappe/model/utils/init.py”, line 6, in
from frappe.build import html_to_js_template
File “/srv/bench/frappe-bench/apps/frappe/frappe/build.py”, line 10, in
from distutils.spawn import find_executable
File “/srv/bench/frappe-bench/env/lib/python3.8/distutils/init.py”, line 44, in
from distutils import dist, sysconfig # isort:skip
ImportError: cannot import name ‘dist’ from partially initialized module ‘distutils’ (most likely due to a circular import) (/srv/bench/frappe-bench/env/lib/python3.8/distutils/init.py)
Traceback (most recent call last):
File “/home/erp/.local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/erp/.local/lib/python3.9/site-packages/bench/cli.py”, line 48, in cli
if sys.argv[1] in get_frappe_commands() + [“–site”, “–verbose”, “–force”, “–profile”]:
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘list’