GithubHelp home page GithubHelp logo

Pip failed about azure-iot-cli-extension HOT 7 CLOSED

azure avatar azure commented on May 29, 2024
Pip failed

from azure-iot-cli-extension.

Comments (7)

digimaun avatar digimaun commented on May 29, 2024 1

An update for everyone. The Az CLI team released a new Windows MSI (2.0.39) that should fix this pip issue out of the box. Tangentially we released a new IoT extension version (v0.5.0) with tons of goodness.

I recommend upgrading both the CLI and IoT extension to these versions.

from azure-iot-cli-extension.

digimaun avatar digimaun commented on May 29, 2024

Thank you for reporting the issue @jphellemons. We have been working with the Azure CLI team to determine the root cause. In short there is a problem with the pip packaged in the CLI Windows Installer - this is being worked on.

For now try this workaround (thanks @troydai):

  1. Open CMD as Admin
  2. Download https://bootstrap.pypa.io/get-pip.py
  3. Run ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python’ -m pip uninstall pip setuptools
  4. Run ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python’ <path to the get-pip.py>

After this re-run:
az extension add --name azure-cli-iot-ext --debug

from azure-iot-cli-extension.

jphellemons avatar jphellemons commented on May 29, 2024

Thank you for your reply. I did get a success message. But also had some red lines:

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2>python -m pip uninstall pip setuptools
Uninstalling pip-10.0.1:
  Would remove:
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip-10.0.1.dist-info\*
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\certifi\cacert.pem
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\distlib\_backport\sysconfig.cfg
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\distlib\t32.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\distlib\t64.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\distlib\w32.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\pip\_vendor\distlib\w64.exe
Proceed (y/n)? y
  Successfully uninstalled pip-10.0.1
Uninstalling setuptools-39.2.0:
  Would remove:
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools-39.2.0.dist-info\*
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\cli-32.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\cli-64.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\cli.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\command\launcher manifest.xml
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\gui-32.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\gui-64.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\gui.exe
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\script (dev).tmpl
    c:\program files (x86)\microsoft sdks\azure\cli2\lib\site-packages\setuptools\script.tmpl
Proceed (y/n)? y
  Successfully uninstalled setuptools-39.2.0

C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2>python "C:\Users\leode\Downloads\get-pip.py"
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 3.5MB/s
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/7f/e1/820d941153923aac1d49d7fc37e17b6e73bfbd2904959fffbad77900cf92/setuptools-39.2.0-py2.py3-none-any.whl (567kB)
    100% |████████████████████████████████| 573kB 3.5MB/s
knack 0.3.3 requires pyyaml, which is not installed.
knack 0.3.3 requires tabulate, which is not installed.
keyring 12.2.1 requires pywin32-ctypes!=0.1.0,!=0.1.1; sys_platform == "win32", which is not installed.
humanfriendly 4.12.1 requires pyreadline; sys_platform == "win32", which is not installed.
cffi 1.11.5 requires pycparser, which is not installed.
azure-cli-interactive 0.3.23 requires pyyaml~=3.12, which is not installed.
azure-cli-cosmosdb 0.1.21 requires pydocumentdb>=2.0.1, which is not installed.
azure-cli-core 2.0.38 requires pyyaml, which is not installed.
azure-cli-core 2.0.38 requires tabulate<=0.8.2,>=0.7.7, which is not installed.
azure-cli-container 0.1.24 requires pyyaml, which is not installed.
azure-cli-appservice 0.1.35 requires vsts-cd-manager<1.1.0, which is not installed.
azure-cli-acs 2.1.1 requires pyyaml, which is not installed.
azure-cli-acs 2.1.1 requires sshtunnel, which is not installed.
Installing collected packages: pip, setuptools
Successfully installed pip-10.0.1 setuptools-39.2.0

at the x requires y which is not installed part

from azure-iot-cli-extension.

digimaun avatar digimaun commented on May 29, 2024

Appreciate the logs. Does the IoT extension work for you now at this state even with the errors?

from azure-iot-cli-extension.

yorek avatar yorek commented on May 29, 2024

I'm having the same problem. The error seems related to a missing library/module:

Cleaning up...
  Removing source in C:\Users\damauri\AppData\Local\Temp\pip-install-pc6606u_\pywin32-ctypes
  Removing source in C:\Users\damauri\AppData\Local\Temp\pip-install-pc6606u_\pycparser
Exception:
Traceback (most recent call last):
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\basecommand.py", line 228, in main
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\commands\install.py", line 335, in run
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\req\__init__.py", line 49, in install_given_reqs
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\req\req_install.py", line 748, in install
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\req\req_install.py", line 961, in move_wheel_files
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_internal\wheel.py", line 461, in move_wheel_files
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\scripts.py", line 414, in make_multiple
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\scripts.py", line 403, in make
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\scripts.py", line 307, in _make_script
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\scripts.py", line 243, in _write_script
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\scripts.py", line 382, in _get_launcher
  File "C:\Users\trdai\AppData\Local\Temp\pip-install-sdgzl9m_\pip\pip\_vendor\distlib\resources.py", line 329, in finder
pip._vendor.distlib.DistlibException: Unable to locate finder for 'pip._vendor.distlib'

Command '['C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\python.exe', '-m', 'pip', 'install', '--target', 'C:\\Users\\damauri\\.azure\\cliextensions\\azure-cli-iot-ext', 'C:\\Users\\damauri\\AppData\\Local\\Temp\\tmp2bybamqj\\azure_cli_iot_ext-0.4.5-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 2.
Pip failed so deleting anything we might have installed at C:\Users\damauri\.azure\cliextensions\azure-cli-iot-ext
An error occurred. Pip failed with status code 2. Use --debug for more information.

After having reinstalled pip as @digimaun suggested, everything works, even if during pip install I also got some warnings about missing packages, and specifically:

knack 0.3.3 requires pyyaml, which is not installed.
knack 0.3.3 requires tabulate, which is not installed.
keyring 12.2.1 requires pywin32-ctypes!=0.1.0,!=0.1.1; sys_platform == "win32", which is not installed.
humanfriendly 4.12.1 requires pyreadline; sys_platform == "win32", which is not installed.
cffi 1.11.5 requires pycparser, which is not installed.
azure-cli-interactive 0.3.23 requires pyyaml~=3.12, which is not installed.
azure-cli-cosmosdb 0.1.21 requires pydocumentdb>=2.0.1, which is not installed.
azure-cli-core 2.0.38 requires pyyaml, which is not installed.
azure-cli-core 2.0.38 requires tabulate<=0.8.2,>=0.7.7, which is not installed.
azure-cli-container 0.1.24 requires pyyaml, which is not installed.
azure-cli-appservice 0.1.35 requires vsts-cd-manager<1.1.0, which is not installed.
azure-cli-acs 2.1.1 requires pyyaml, which is not installed.
azure-cli-acs 2.1.1 requires sshtunnel, which is not installed.

from azure-iot-cli-extension.

klucyszy avatar klucyszy commented on May 29, 2024

Having the same issue. Happily, after @digimaun hints iot extension work properly. Thank you : )

from azure-iot-cli-extension.

gunnalag avatar gunnalag commented on May 29, 2024

I am facing the similar issue of Pip failed error. I am already running the latest version azure-cli-2.0.67 on my system.

C:\>az interactive
This command is in preview. It may be changed/removed in a future release.
Installing the Interactive extension...
An error occurred. Pip failed with status code 1. Use --debug for more information.

C:\>

Am I supposed to run the same pip fix given in this thread?

from azure-iot-cli-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.