Moving venv from one VM to another

I am currently running HA in a venv under Ubuntu. The locations of the homeassistant directory and the .homeassistant directory are in non standard locations so I have rebuilt another VM with the and configured it to use /srv/homeassistant and home/homeassitant as per the directions on HA’s site. I started up the new HA instance, then stopped it and rsynced everything in the .homeassistant folder from the original VM to the new VM, however once I started it back I am getting errors about 2 integrations (xiaomi and wled) and cannot figure out how to fix them. I also cannot seem to uninstall these integrations and they show “Not Loaded” in the UI.

Screen Shot 2021-11-11 at 2.08.22 PM

Here is the log with the errors. If anyone can help it would be appreciated:

hass[4922]: 2021-11-11 18:47:25 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration xiaomi_miio: cannot import name 'MiCloud' from 'micloud' (/srv/homeassistant/lib/python3.8/site-packages/micloud/__init__.py)
Nov 11 18:47:25 homeassistantvenv hass[4922]: 2021-11-11 18:47:25 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Nov 11 18:47:25 homeassistantvenv hass[4922]: Traceback (most recent call last):
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/config_entries.py", line 709, in async_create_flow
Nov 11 18:47:25 homeassistantvenv hass[4922]:     integration.get_platform("config_flow")
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/loader.py", line 530, in get_platform
Nov 11 18:47:25 homeassistantvenv hass[4922]:     cache[full_name] = self._import_platform(platform_name)
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/loader.py", line 535, in _import_platform
Nov 11 18:47:25 homeassistantvenv hass[4922]:     return importlib.import_module(f"{self.pkg_path}.{platform_name}")
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
Nov 11 18:47:25 homeassistantvenv hass[4922]:     return _bootstrap._gcd_import(name[level:], package, level)
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/wled/__init__.py", line 13, in <module>
Nov 11 18:47:25 homeassistantvenv hass[4922]:     from .coordinator import WLEDDataUpdateCoordinator
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/wled/coordinator.py", line 7, in <module>
Nov 11 18:47:25 homeassistantvenv hass[4922]:     from wled import WLED, Device as WLEDDevice, WLEDConnectionClosed, WLEDError
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/wled/__init__.py", line 18, in <module>
Nov 11 18:47:25 homeassistantvenv hass[4922]:     from .wled import (
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/wled/wled.py", line 13, in <module>
Nov 11 18:47:25 homeassistantvenv hass[4922]:     from packaging import version
Nov 11 18:47:25 homeassistantvenv hass[4922]: ModuleNotFoundError: No module named 'packaging'
Nov 11 18:47:25 homeassistantvenv hass[4922]: During handling of the above exception, another exception occurred:
Nov 11 18:47:25 homeassistantvenv hass[4922]: Traceback (most recent call last):
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/discovery_flow.py", line 74, in _async_process_pending_flows
Nov 11 18:47:25 homeassistantvenv hass[4922]:     await gather_with_concurrency(
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/util/async_.py", line 170, in gather_with_concurrency
Nov 11 18:47:25 homeassistantvenv hass[4922]:     return await gather(
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/util/async_.py", line 168, in sem_task
Nov 11 18:47:25 homeassistantvenv hass[4922]:     return await task
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 197, in async_init
Nov 11 18:47:25 homeassistantvenv hass[4922]:     flow, result = await task
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 215, in _async_init
Nov 11 18:47:25 homeassistantvenv hass[4922]:     flow = await self.async_create_flow(handler, context=context, data=data)
Nov 11 18:47:25 homeassistantvenv hass[4922]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/config_entries.py", line 716, in async_create_flow
Nov 11 18:47:25 homeassistantvenv hass[4922]:     raise data_entry_flow.UnknownHandler
Nov 11 18:47:25 homeassistantvenv hass[4922]: homeassistant.data_entry_flow.UnknownHandler

OK so I figured this out. It seems that the CORE (venv) installation has a known issue that does not install ‘package’ during the installation process. The fix is to manually install ‘package’ as shown here: WLED: ModuleNotFoundError: No module named 'packaging' · Issue #36634 · home-assistant/core · GitHub

The above fixed both integration issues. I also had to manually install FFMPEG to fix another error message. All is working now.