Yes, I did an opkg update. “python -m ensurepip” won’t work but there is indeed an ensurepip package in the opkg repository.
root@einstein:/etc/opkg# opkg install python3-ensurepip
Installing python3-ensurepip (3.12.8) on root
Downloading https://updates.victronenergy.com/feeds/venus/candidate/packages/scarthgap/cortexa7hf-neon-vfpv4/python3-ensurepip_3.12.8-r0_cortexa7hf-neon-vfpv4.ipk.
Configuring python3-ensurepip.
Unfortunately, this crashes:
root@einstein:/data/drivers# python3 -m ensurepip
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "<frozen runpy>", line 226, in run_module
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/__main__.py", line 22, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/main.py", line 11, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/autocompletion.py", line 10, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/main_parser.py", line 9, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/build_env.py", line 18, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/spinners.py", line 9, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_internal/utils/logging.py", line 13, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_vendor/rich/console.py", line 47, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_vendor/rich/themes.py", line 1, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_vendor/rich/default_styles.py", line 3, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_vendor/rich/style.py", line 8, in <module>
File "/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl/pip/_vendor/rich/color.py", line 3, in <module>
ModuleNotFoundError: No module named 'colorsys'
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.12/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/ensurepip/__init__.py", line 284, in _main
return _bootstrap(
^^^^^^^^^^^
File "/usr/lib/python3.12/ensurepip/__init__.py", line 200, in _bootstrap
return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/ensurepip/__init__.py", line 101, in _run_pip
return subprocess.run(cmd, check=True).returncode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmp7i9tfw64/pip-24.3.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmp7i9tfw64\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
And the dbus-mqtt-devices setup still cannot find pip.
root@einstein:/data/drivers# ./dbus-mqtt-devices-0.8.0/bin/setup.sh
dbus-mqtt-devices: Setup in /data/drivers/dbus-mqtt-devices-0.8.0 started
dbus-mqtt-devices: Checking to see if Python's Pip is installed
/usr/bin/python: No module named pip
Downloading https://updates.victronenergy.com/feeds/venus/candidate/packages/scarthgap/all/Packages.gz.
Updated source 'all'.
Downloading https://updates.victronenergy.com/feeds/venus/candidate/packages/scarthgap/cortexa7hf-neon-vfpv4/Packages.gz.
Updated source 'cortexa7hf-neon-vfpv4'.
Downloading https://updates.victronenergy.com/feeds/venus/candidate/packages/scarthgap/einstein/Packages.gz.
Updated source 'einstein'.
* opkg_prepare_url_for_install: Couldn't find anything to satisfy 'python3-pip'.
dbus-mqtt-devices: Pip install module dependencies
/usr/bin/python: No module named pip
dbus-mqtt-devices: Set up Victron module libraries
dbus-mqtt-devices: Set up device service to autorun on restart
dbus-mqtt-devices: Adding device service to /data/rc.local
dbus-mqtt-devices: Setup complete
I give up for now and will revert back again until this is solved. Don’t want to manually fiddle too much in the repository and installed Python modules.