Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtualenv step failing in install script #23215

Closed
JoranDox opened this issue Jul 15, 2022 · 4 comments
Closed

Virtualenv step failing in install script #23215

JoranDox opened this issue Jul 15, 2022 · 4 comments
Assignees
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation
Milestone

Comments

@JoranDox
Copy link

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

N/A, installation fails

Describe the bug

Literally just running the installation with all defaults and get this:

    ~  curl -L https://aka.ms/InstallAzureCli | bash                                                                                                                                    

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1405  100  1405    0     0   1276      0  0:00:01  0:00:01 --:--:--     0
Downloading Azure CLI install script from https://azurecliprod.blob.core.windows.net/install.py to /tmp/azure_cli_install_tmp_MdUQul.
######################################################################## 100.0%
/tmp/azure_cli_install_tmp_MdUQul: OK
Running install script.
-- Verifying Python version.
-- Python version 3.10.5 okay.
-- Verifying native dependencies.
-- Unable to verify native dependencies. dist=manjaro linux, version=None. Continuing...

===> In what directory would you like to place the install? (leave blank to use '/home/joran/lib/azure-cli'): 
-- Creating directory '/home/joran/lib/azure-cli'.
-- We will install at '/home/joran/lib/azure-cli'.

===> In what directory would you like to place the 'az' executable? (leave blank to use '/home/joran/bin'): 
-- The executable will be in '/home/joran/bin'.
-- Downloading virtualenv package from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-16.7.11.tar.gz.
-- Downloaded virtualenv package to /tmp/tmp99mylczl/virtualenv-16.7.11.tar.gz.
-- Checksum of /tmp/tmp99mylczl/virtualenv-16.7.11.tar.gz OK.
-- Extracting '/tmp/tmp99mylczl/virtualenv-16.7.11.tar.gz' to '/tmp/tmp99mylczl'.
-- Executing: ['/usr/bin/python3', 'virtualenv.py', '--python', '/usr/bin/python3', '/home/joran/lib/azure-cli']
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/joran/lib/azure-cli/bin/python3
Also creating executable in /home/joran/lib/azure-cli/bin/python
Traceback (most recent call last):
  File "/tmp/tmp99mylczl/virtualenv-16.7.11/virtualenv.py", line 2644, in <module>
    main()
  File "/tmp/tmp99mylczl/virtualenv-16.7.11/virtualenv.py", line 859, in main
    create_environment(
  File "/tmp/tmp99mylczl/virtualenv-16.7.11/virtualenv.py", line 1174, in create_environment
    install_distutils(home_dir)
  File "/tmp/tmp99mylczl/virtualenv-16.7.11/virtualenv.py", line 1795, in install_distutils
    distutils_path = change_prefix(distutils.__path__[0], home_dir)
  File "/tmp/tmp99mylczl/virtualenv-16.7.11/virtualenv.py", line 1282, in change_prefix
    raise AssertionError("Filename {} does not start with any of these prefixes: {}".format(filename, prefixes))
AssertionError: Filename /home/joran/.local/lib/python3.10/site-packages/setuptools/_distutils does not start with any of these prefixes: ['/usr', '/usr']
Traceback (most recent call last):
  File "/tmp/azure_cli_install_tmp_MdUQul", line 415, in <module>
    main()
  File "/tmp/azure_cli_install_tmp_MdUQul", line 399, in main
    create_virtualenv(tmp_dir, install_dir)
  File "/tmp/azure_cli_install_tmp_MdUQul", line 144, in create_virtualenv
    exec_command(cmd, cwd=working_dir)
  File "/tmp/azure_cli_install_tmp_MdUQul", line 105, in exec_command
    subprocess.check_call(command_list, cwd=cwd, env=env)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'virtualenv.py', '--python', '/usr/bin/python3', '/home/joran/lib/azure-cli']' returned non-zero exit status 1.

To Reproduce

curl -L https://aka.ms/InstallAzureCli | bash

Expected behavior

AZ command line gets installed

Environment summary

Manjaro linux
python3.10

Additional context

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Installation labels Jul 15, 2022
@ghost ghost assigned jiasli Jul 15, 2022
@ghost ghost added this to the Backlog milestone Jul 15, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 15, 2022

@jiasli for awareness

@bebound
Copy link
Contributor

bebound commented Jul 18, 2022

This script is outdated. You can use this guide to install azure-cli with pip: #20476

@JoranDox JoranDox closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2022
@balazs-endresz
Copy link

If that script is outdated then why hasn't it been removed from the documentation? https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=script#install-or-update-azure-cli And why is pip not mentioned there at all?

@Qodestackr
Copy link

If that script is outdated then why hasn't it been removed from the documentation? https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=script#install-or-update-azure-cli And why is pip not mentioned there at all?

I wonder, I heavily rely on docs to learn cloud but this is disappointing. No fixes whatsoever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Installation
Projects
None yet
Development

No branches or pull requests

6 participants