Large amount of errors installing `python-playwright-git`

The error message after failure is huge so I posted it on pastebin (if that’s ok).

The relevant error message probably:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
  100 19.0M  100 19.0M    0     0   333k      0  0:00:58  0:00:58 --:--:--  361k
  Traceback (most recent call last):
File "/home/moss/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/", line 280, in <module>
File "/home/moss/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/", line 263, in main
  json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/moss/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/", line 204, in build_wheel
  return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-vpxu1rpd/overlay/lib/python3.8/site-packages/setuptools/", line 221, in build_wheel
  return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-vpxu1rpd/overlay/lib/python3.8/site-packages/setuptools/", line 207, in _build_with_temp_dir
File "/tmp/pip-build-env-vpxu1rpd/overlay/lib/python3.8/site-packages/setuptools/", line 150, in run_setup
  exec(compile(code, __file__, 'exec'), locals())
File "", line 133, in <module>
File "/tmp/pip-build-env-vpxu1rpd/overlay/lib/python3.8/site-packages/setuptools/", line 153, in setup
  return distutils.core.setup(**attrs)
File "/home/moss/miniconda3/lib/python3.8/distutils/", line 148, in setup
File "/home/moss/miniconda3/lib/python3.8/distutils/", line 966, in run_commands
File "/home/moss/miniconda3/lib/python3.8/distutils/", line 985, in run_command
File "", line 120, in run
  with InWheel(
  TypeError: __init__() got an unexpected keyword argument 'ret_self'


  ERROR: Failed building wheel for playwright
Failed to build playwright
ERROR: Could not build wheels for playwright which use PEP 517 and cannot be installed directly
==> ERROR: A failure occurred in package().
error making: python-playwright-git

What I am trying to do:

I am trying to run a python script that requires playwright. If I install it using pip, when running, it complains a shared library,, is not found.

$ yay -F
core/icu 68.2-1 [installed: 69.1-1]
community/onlyoffice-desktopeditors 6.1.0-4
multilib/lib32-icu 68.2-1 [installed: 69.1-1]
alerque/zoom-system-qt 5.4.53391.1108-3

So I am guessing I need to build playwrght myself. That is why I am trying to install python-playwright-git.

You’re trying to install with yay which installs the package system-wide. However, in your log, you’re using your user’s miniconda installation.

Instead of a global installation, I recommend using a virtualenv based on the system’s Python installation (and not miniconda) or pyenv and then you can easily run pip install playwright.

1 Like

I tried using virtualenv resulting in the same error:

$ virtualenv -p python3 tu
$ cd tu
$ source bin/activate
$ pip install playwright
$ python -m playwright install

When I run the script I still get this error:

==================== Browser output: ====================
<launching> /home/moss/.cache/ms-playwright/webkit-1446/ --inspector-pipe --headless --no-startup-window
<launched> pid=7161
[pid=7161][err] /home/moss/.cache/ms-playwright/webkit-1446/minibrowser-wpe/bin/MiniBrowser: error while loading shared libraries: cannot open shared object file: No such file or directory
=========================== logs ===========================
<launching> /home/moss/.cache/ms-playwright/webkit-1446/ --inspector-pipe --headless --no-startup-window
<launched> pid=7161
[pid=7161][err] /home/moss/.cache/ms-playwright/webkit-1446/minibrowser-wpe/bin/MiniBrowser: error while loading shared libraries: cannot open shared object file: No such file or directory

What am I doing wrong?