I upgraded mycodo to version 18.6.0 today, and it seemed to break my system. I then read the changelog (that’s my bad )-- and realized I am still running Raspbian Buster and needed to upgrade Python. I installed Python 3.8, then ran:
sudo /opt/Mycodo/mycodo/scripts/upgrade_post.sh
To re-do the upgrade. It looks like I am still having a python or pip version issue? Here’s the upgrade log.
Appreciate any and all help-- I’m an amateur and these Python versions are confusing me…
Narrowing down on the issue; here’s the error I received setting up the virtualenv:
#### Checking Python 3 virtual environment
#### Creating virtual environment at /opt/Mycodo/env
Error: Command '['/opt/Mycodo/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 2.
#### Updating pip
#### Checking Python 3 virtual environment
/opt/Mycodo/env/bin/python: No module named pip
#### Installing pip requirements
#### Checking Python 3 virtual environment
/opt/Mycodo/env/bin/python: No module named pip
/opt/Mycodo/env/bin/python: No module named pip
#### Checking for updates to dependencies
Traceback (most recent call last):
File "/opt/Mycodo/mycodo/utils/update_dependencies.py", line 10, in <module>
from mycodo.config import (CAMERA_INFO, DEPENDENCIES_GENERAL,
File "/opt/Mycodo/mycodo/config.py", line 10, in <module>
from flask_babel import lazy_gettext as lg
ModuleNotFoundError: No module named 'flask_babel'
I checked to ensure pip and pip3 were installed:
pi@CannaBot:~ $ pip --version
pip 24.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
pi@CannaBot:~ $ pip3 --version
pip 24.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
pip installed via apt is not advised, which is why it’s uninstalled during the setup process and pip is installed via a better method. Try deleting /opt/Mycodo/env and rerunning sudo /opt/Mycodo/install/setup.sh
After deleting /opt/Mycodo/env, and rerunning setup.sh, received following message:
pi@CannaBot:~ $ sudo /opt/Mycodo/install/setup.sh
## Currently installing with /opt/Mycodo/install/setup.sh
Checking Python version...
Python >= 3.6 found.
Error: dialog not installed. Install it then try the Mycodo setup again.
Yeah, I will just do a fresh install of Bookworm on this Pi and then a fresh install of Mycodo. Luckily I have a second unit that I swapped out to control the garden while I troubleshoot this unit. Thanks for all your help!