Skip to content

Script make-firmware.bash for Python >= 3.11 and virtual envs #114

@EskoDijk

Description

@EskoDijk

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions