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.

Cannot install playwright

See original GitHub issue
  • I have searched the issue tracker and believe that this is not a duplicate.

The message at the end already hints at the fact that playwright seems to rely on a package operations which is not yet implemented. I just wanted to let you know.

Steps to reproduce

pdm add -v playwright==1.8.0a1

Adding packages to default dependencies: playwright
======== Start resolving requirements ========
        playwright==1.8.0a1
        Adding requirement playwright==1.8.0a1
        Adding requirement greenlet==1.0.0(from playwright 1.8.0a1)
        Adding requirement pyee>=8.0.1(from playwright 1.8.0a1)
        Adding requirement typing-extensions(from playwright 1.8.0a1)
Resolving: playwright 1.8.0a1
        New pin: playwright 1.8.0a1
======== Ending round 0 ========
Resolving: pyee 8.1.0
        New pin: pyee 8.1.0
======== Ending round 1 ========
Resolving: typing-extensions 3.7.4.3
        New pin: typing-extensions 3.7.4.3
======== Ending round 2 ========
Resolving: greenlet 1.0.0
        New pin: greenlet 1.0.0
======== Ending round 3 ========
Finish resolving
======== Resolution Result ========
Stable pins:
         playwright 1.8.0a1
               pyee 8.1.0
  typing-extensions 3.7.4.3
           greenlet 1.0.0
Extracting package metadata
🔒 Lock successful
Changes are written to pdm.lock.
Changes are written to pyproject.toml.
Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove

  Install playwright 1.8.0a1 failed
  Retry failed jobs
  Install playwright 1.8.0a1 failed

ERRORS:                                                                                                                                                                
add playwright failed:
Traceback (most recent call last):
  File "/usr/lib64/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/synchronizers.py", line 143, in install_candidate
    installer.install(can)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/installers.py", line 48, in install
    self.install_wheel(candidate.wheel)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/installers.py", line 54, in install_wheel
    wheel.install(paths, maker)
  File "/home/tom/.local/lib/python3.8/site-packages/distlib/wheel.py", line 549, in install
    row = records[u_arcname]
KeyError: 'playwright/driver/node'

Traceback (most recent call last):
  File "/home/tom/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/core.py", line 73, in __call__
    return self.main(*args, **kwargs)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/core.py", line 112, in main
    raise err.with_traceback(traceback)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/core.py", line 108, in main
    f(options.project, options)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/cli/commands/add.py", line 35, in handle
    actions.do_add(
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/cli/actions.py", line 178, in do_add
    do_sync(
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/cli/actions.py", line 125, in do_sync
    handler.synchronize(clean=clean, dry_run=dry_run)
  File "/home/tom/.local/lib/python3.8/site-packages/pdm/installers/synchronizers.py", line 328, in synchronize
    raise InstallationError("Some package operations are not complete yet")
pdm.exceptions.InstallationError: Some package operations are not complete yet

Environment Information

PDM version:        1.3.1                   
Python Interpreter: /usr/bin/python3 (3.8.7)
Project Root:       /home/tom/proj/pw       
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.7",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.16-1-default",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Sat Feb 13 16:20:19 UTC 2021 (11381f3)",
  "python_full_version": "3.8.7",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kumaraditya303commented, Feb 25, 2021

@pohlt A fix is on the way Microsoft/playwright-python#525

0reactions
frostmingcommented, Mar 5, 2021

The upstream project has created a fix for the wheel and merged. Close this issue now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] playwright install not working as intended #1311 - GitHub
I managed to actually solve the problem through doing a simple python3 -m pip install --force-reinstall playwright .
Read more >
Error when installing Microsoft Playwright - python
WARNING: The script playwright.exe is installed in 'C:\Users\foo\AppData\Local\Programs\Python\Python310\Scripts' which is not on PATH. If so, ...
Read more >
Installation | Playwright
Playwright downloads Chromium, Firefox and WebKit browsers by default. To install a specific browser, pass it as an argument during installation. $ pip...
Read more >
playwright - npm
A high-level API to automate web browsers. Latest version: 1.29.0, last published: 5 days ago. Start using playwright in your project by ...
Read more >
How to Install Playwright - YouTube
The steps for installing Playwright are the same no matter which operating system you use. ... Your browser can't play this video.
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