The script make-firmware.bash has 4 instances of pip3 install --user <other params>. The --user flag causes problems with modern Python (>= 3.11 ?) which need to run in a Python virtual env to be able to install anything with pip3. The pip3 install fails due to this in a venv. And without venv, it fails because installing via an (APT) package is the desired way, if not in a venv.
I tried just removing the --user flags and that works for a Python venv - the build succeeds.
- Should we remove the
--user flags in the repo also?
- Or is there a reason to keep the
--user flag for those running an older Python3 version?
- If so, should we just detect the python3 version and add the
--user flag conditionally on version?
- For OTNS2 I already have some bash code to check if the python3 version is higher than 3.N.
See for background: https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments
The script
make-firmware.bashhas 4 instances ofpip3 install --user <other params>. The--userflag causes problems with modern Python (>= 3.11 ?) which need to run in a Python virtual env to be able to install anything with pip3. The pip3 install fails due to this in a venv. And without venv, it fails because installing via an (APT) package is the desired way, if not in a venv.I tried just removing the
--userflags and that works for a Python venv - the build succeeds.--userflags in the repo also?--userflag for those running an older Python3 version?--userflag conditionally on version?See for background: https://packaging.python.org/en/latest/specifications/externally-managed-environments/#externally-managed-environments