I have been a little messed up with the Bench Environment and the Python versions. I keep getting messages about Python 3.5 or Python 2.7 getting deprecated. So, can somebody that’s knowledgeable about these things, please help out and document and following:
What version of Python should the bench environment be on? python3, python3.5, python3.6, python3.8?
What are the prerequisites to be able to migrate the bench environment to the recommended Python version? Does the underlying Ubuntu supported on 16.x or does it have to be 18.x?
What are the commands to successfully migrate the bench environment to the new version of Python? Does a new bench have to be created?
I lost two instances in the last few days. One was a ver 13 environment and the other a ver 12 environment. Both I think were on Ubuntu 16.x. Luckily both were non-Production environments, but I shall have to migrate my clients production environments very soon and I can’t afford to lose those instances.
I had tried a whole bunch of things yesterday on this server and got into all kinds of trouble. So, I am trying again today to see if I can recover this test instance.
Then I tried bench migrate-env python3.8 from the frappe-bench folder and I am getting this error:
bench migrate-env python3.8Traceback (most recent call last):
File “/usr/local/bin/bench”, line 6, in
from pkg_resources import load_entry_point
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2928, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2913, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 635, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 943, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 829, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘bench’ distribution was not found and is required by the application