Bench commands not running in frappe-bench folder

After upgrading Ubuntu to 20 from 18 I’m getting a weird situation. If I run bench src from the home folder ~, it seems to run, but bench update says it isn’t in the right folder. . If I cd into frappe-bench I get errors with any bench commands.

frappe@ubuntu:~$ bench src
frappe@ubuntu:~$ cd frappe-bench/
frappe@ubuntu:~/frappe-bench$ bench src
Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f8984008740 (most recent call first):

Traceback (most recent call last):
File “/home/frappe/.local/bin/bench”, line 8, in
File “/home/frappe/.local/lib/python3.8/site-packages/bench/”, 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’

same issue here. any idea?

I had to put the Ubuntu 20 VM on the shelf and keep using 18 with version 12. A spinoff of that has been updated to 13 after some effort.

Try to get your python to 3.9 , and run bench migrate-env python3.9. I’ve been reinstalling alot of python/pip apps, run pip3 install --upgrade frappe-bench with sudo as well. That has at least got me to the point where I have a somewhat operable bench in ~/frappe-bench but getting mariadb , redis and other requirements set up is taking more time than I have been able to spend on it.