Skip to content

Ubuntu 24 python3.12 venv activate command does not execute #1788

@eccles

Description

@eccles

When upgrading to ubuntu 24.04 and using a python venv in a task using the builtin shell, an error occurs.

This error is because the built-in shell in go-task does not honour the 'hash' command and the python3 devs removed the conditional check in the 'activate' command.

See pypa/virtualenv#2086

  • Task version: 3.37.2
  • Operating system: ubuntu 24.04
  • Experiments enabled: no

This was mitigated by explicitly using bash.

Example

  something:
    desc: runs the something command - does not work
    deps: [venv]
    cmds:
      - |
        source venvs/avid-scripts/bin/activate
        trap deactivate EXIT
        python3 -m something --option value


Fix:

  something:
    desc: runs the something command - does work
    deps: [venv]
    cmds:
      - |
        bash <<EOF
        source venvs/avid-scripts/bin/activate
        trap deactivate EXIT
        python3 -m something --option value
        EOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions