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

Poetry Install crashes for python-preview branch. #116

Closed
Codie-Petersen opened this issue Mar 19, 2023 · 6 comments
Closed

Poetry Install crashes for python-preview branch. #116

Codie-Petersen opened this issue Mar 19, 2023 · 6 comments

Comments

@Codie-Petersen
Copy link

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
@timlaverty
Copy link

@alexchaomander , can you take a look please?

@alexchaomander
Copy link
Contributor

alexchaomander commented Mar 20, 2023

@Codie-Petersen Hmm I'm not able to reproduce this on my side. Can you clear your pypoetry cache and try again?

rm -rf ~/.cache/pypoetry/

@richardk53
Copy link

Same problem for python 3.11.2

@Codie-Petersen
Copy link
Author

Codie-Petersen commented Mar 20, 2023

@alexchaomander
Just tried it, didn't work. Might work for other people though.

For other people who want to try on windows (@richardk53 maybe):
poetry config --list

Should give you this:

cache-dir = "C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}\\virtualenvs"  # C:\Users\peter\AppData\Local\pypoetry\Cache\virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"

Then you can try manually deleting the pypoetry folder with the cache-dir.

@jjhenkel
Copy link

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: microsoft/debugpy#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.

@Codie-Petersen
Copy link
Author

@jjhenkel Nice, that worked. Thanks.

@richardk53 Solution if you are on windows.

golden-aries pushed a commit to golden-aries/semantic-kernel that referenced this issue Oct 10, 2023
Bumps
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)
from 18.2.17 to 18.2.18.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/react&package-manager=npm_and_yarn&previous-version=18.2.17&new-version=18.2.18)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants