question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poetry Install crashes for python-preview branch.

See original GitHub issue

Describe the bug The poetry install command fails at debugpy installation. Possibly due to hashing error on ‘debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll’.

To Reproduce Steps to reproduce the behavior:

  1. Checkout python-preview branch: git checkout python-preview
  2. Change directory to python: cd python
  3. Install Poetry: pip install poetry
  4. Run Poetry installation: poetry install
  5. Should install most but stops and fails at debugpy.

Expected behavior I was walking through the README.md tutorial for python setup in the branch. Expected the install to go through nicely.

Log This is the log after a second install attempt.

Package operations: 7 installs, 0 updates, 0 removals

  • Installing debugpy (1.6.6)

  _WheelFileValidationError

  ["In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp310-win_amd64.pyd didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp310-win_amd64.pyd didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]

  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\installer\sources.py:289 in validate_record
      285│                         f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
      286│                     )
      287│
      288│         if issues:
    → 289│             raise _WheelFileValidationError(issues)
      290│
      291│     def get_contents(self) -> Iterator[WheelContentElement]:
      292│         """Sequential access to all contents of the wheel (including dist-info files).
      293│

Desktop (please complete the following information):

  • OS [dxdiag]: Windows 10 Pro 64-bit Build 19044
  • Python: Python 3.10.6
  • Pip: 23.0.1
  • VSCode:
    • 1.76.2
    • ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
    • x64

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jjhenkelcommented, Mar 20, 2023

I can reproduce this now! (I run an ubuntu desktop and WSL normally, but setup on regular Windows to reproduce this.)

This issue seems to be the culprit: https://github.com/microsoft/debugpy/issues/1246

For now, it seems the workaround is:

poetry config installer.modern-installation false --local

After that, you should be able to complete:

poetry install

poetry shell

python

And, in the python terminal, do something like import semantic_kernel as sk.

1reaction
Codie-Petersencommented, Mar 20, 2023

@jjhenkel Nice, that worked. Thanks.

@richardk53 Solution if you are on windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry install crashes with packages from git
One of our dependencies is pulled from github. Poetry crashes during the installation. This only happens when called using the pre-recieve hook.
Read more >
Introduction | Documentation | Poetry - Python dependency ...
Introduction Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on...
Read more >
Dependency specification | master | Documentation
Since we haven't specified any other information, Poetry assumes that we intend to use the latest commit on the master branch to build...
Read more >
Commands | Documentation
The install command reads the pyproject.toml file from the current project, resolves the dependencies, and installs them. poetry install. If there ...
Read more >
Basic usage | Documentation
Basic usage. Project setup. Initialising a pre-existing project; Specifying dependencies. Using your virtual environment. Using poetry run ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found