ModuleNotFoundError: No module named 'pkg_resources.py2_warn'

Matthijs van der Veer 4,371 Reputation points MVP
2020-10-20T08:25:55.417+00:00

The Azure IoT Edge Tools for VS 2019 was recently updated to v1.7, and it has introduced an error on my dev machine, blocking me from running the simulator. Another user has posted the same as an issue on the docs site.

When you try to set up the Azure IoT Edge Simulator in VS 2019, the following errors appear:
All calls to iotedgehubdev (c:\users<redacted>\Documents\Visual Studio 2019\iotedgehubdev\v0.14.2\iotedgehubdev.exe)
now throw python package errors.

[11852] Failed to execute script pyi_rth_pkgres Traceback (most recent call last): File "lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in <module> File "d:\a\1\s\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module File "lib\site-packages\pkg_resources\__init__.py", line 86, in <module> ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [ERROR]: Failed to run 'iotedgehubdev setup -c HostName=brasherfarm.azure-devices.net;DeviceId=localdev;SharedAccessKey=xwmGIKdhB+/00lUjxZG+eNl8po/VCuntkoz2xwrR4oA=' with error: [11852] Failed to execute script pyi_rth_pkgres Traceback (most recent call last): File "lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in <module> File "d:\a\1\s\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module File "lib\site-packages\pkg_resources\__init__.py", line 86, in <module> ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
517 questions
{count} votes

Accepted answer
  1. António Sérgio Azevedo 7,661 Reputation points Microsoft Employee
    2020-10-29T18:31:15.18+00:00

    @Matthijs van der Veer @chetan bg ,

    I have confirmed that the issue has been resolved in version 0.14.3 in the iotedgehub dev simulator and has been available to our customers since 10/22. VS and VS code extensions will automatically update to the newer version transparently, without the user intervention.

    For more details on how the issue was fixed see: https://github.com/Azure/iotedgehubdev/issues/288

    Please share here if there are any residual effects still blocking. After 10/22 everything is expected to just work without the user taking any additional action.

    Thank you!

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful