Error when bench update v13.34 to v14

When I updated the bench V13 to V14 then show this error.


ubuntu@tecis_erpnext:/home/frappe/frappe-bench$ bench --version
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1073
    if key := can_cache_doc(args):
            ^
SyntaxError: invalid syntax

5.0.0
`

Please give a Solution.

Hello,
You have a python 3.6 and frappe version-14 require python 3.10

yaa…
I installed the python 3.8 version. and Syntex error is solved but now

ubuntu@tecis_erpnext:/home/frappe/frappe-bench$ bench start
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/bench", line 5, in <module>
    from bench.cli import cli
ModuleNotFoundError: No module named 'bench'
ubuntu@tecis_erpnext:/home/frappe/frappe-bench$

How to solved this?

You have to re-install frappe-bench

pip3 install --install frappe-bench
or
pip3 install --upgrade frappe-bench

?

and
bench setup requirement

The fact is your hosting system do not have bench install correctly as now you change/re-install version of python.

You can find on this forum a lot’s of tutorial to How install Frappe Bench and so one, you should read them first.

You have update to 3.8 but the require for version-14 is 3.10 at least.

1 Like

not done…


new error found

There is obviously a problem with your python and bench install…

I think this is not specifics to Frappe or Bench but more related to Linux and Python system management. I can’t help you more on that, but I’m sure you can dig a little bit with this forum and Python documentation to find out what is going on.

1 Like

Hi

The desired Ubuntu release is Ubuntu 22.04.1 LTS

python3 -V should return Python 3.10.4

node -v v14.20.0

bench --version 5.14.2

bench version erpnext 14.0.2
frappe 14.4.2

I might try sudo pip3 install frappe-bench --upgrade once the above is in place , then

bench switch to branch version-14 frappe erpnext and bench update --patch

1 Like

Thanks for the Reply.

see the screenshot.

so, now how can I reinstall or recover?

Hey Jay,

Just format your system and install the tools with versions specified below. Alternatively, as @FHenry mentioned, use any guide on this forum and you should be good to go.

Try: sudo pip3 install frappe bench --upgrade

1 Like

Tried but same error.

pip3 install --upgrade frappe-bench worked in my case