Skip to content

Editable installation doesn't work with setuptools 80.9.0: No module named azure.cli.__main__; 'azure.cli' is a package and cannot be directly executed #32042

@jiasli

Description

@jiasli

LTS CI fails:

https://dev.azure.com/azclitools/public/_build/results?buildId=269081&view=logs&j=86666e57-faf2-5483-a4de-72294e0f6880&t=7303b7ff-a095-56e0-0151-d5464b43c6c5

# Verify installation and build command index
az --version
/mnt/vss/_work/1/s/env/bin/python: No module named azure.cli.__main__; 'azure.cli' is a package and cannot be directly executed

This can be reproduced locally on dev branch too:

> pip install setuptools -U

> azdev setup -c

> python -c "import azure.cli; print(azure.cli.__path__)"
_NamespacePath(['__editable__.azure_cli-2.77.0.finder.__path_hook__', '__editable__.azure_cli_core-2.77.0.finder.__path_hook__', '__editable__.azure_cli_telemetry-1.1.0.finder.__path_hook__', '__editable__.azure_cli_testsdk-0.3.0.finder.__path_hook__'])

> az -v
D:\cli\py313\Scripts\python.exe: No module named azure.cli.__main__; 'azure.cli' is a package and cannot be directly executed

Metadata

Metadata

Assignees

No one assigned

    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