Repository navigation
Open
Description
I try to install and have error.
user@user-user:~$ pip3 install --user webview
Collecting webview
Using cached https://files.pythonhosted.org/packages/0c/5f/6e84700b7825bcddb12cd3eead8ac787d9d624be9f2c01aa4fb9a88572a9/webview-0.1.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ex70ux09/webview/setup.py", line 43, in <module>
extra_cflags = pkgconfig("--cflags").split()
File "/tmp/pip-build-ex70ux09/webview/setup.py", line 40, in pkgconfig
stderr=subprocess.STDOUT).decode('utf-8')
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'pkg-config --cflags gtk+-3.0 webkit2gtk-4.0' returned non-zero exit status 1.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ex70ux09/webview/
If I try to build result will be the same
user@user-user:~/Downloads/webview-python-master$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 26, in <module>
extra_cflags = pkgconfig("--cflags").split()
File "setup.py", line 23, in pkgconfig
stderr=subprocess.STDOUT).decode('utf-8')
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'pkg-config --cflags gtk+-3.0 webkit2gtk-4.0' returned non-zero exit status 1
system info
user@user-user:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic
I tried to find webkit2* libs and libwebkit2gtk-4.0 was found as dependency.
May be it will be usefull to add dependences into description
Metadata
Metadata
Assignees
Labels
No labels
Activity
pythongiant commentedon Nov 25, 2018
thank you for this
dmytrofrolov commentedon May 21, 2019
I have same problem described, using Ubuntu 16.04.6 LTS
To install dependencies:
In case if pip fails with error:
webview/webview.c:1:20: fatal error: Python.h: No such file or directoryThe python used in venv may be different from python in the system.
next might help, to install proper headers:
sudo apt install python3.6-devmakerio90 commentedon Aug 3, 2021
libwebkit2gtk-4.0-dev has no installation candidate
atm3ga commentedon Nov 20, 2021
try sudo apt-get update if any error when execute the 3rd command
Serverfrog commentedon Apr 5, 2026
Im currently running into the same problem.
i dont have libwebkit2gtk-4.0-dev but only libwebkit2gtk-4.1-dev in my available packages