install error, libwebkit2gtk dependency
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
thank you for this
I have same problem described, using Ubuntu 16.04.6 LTS
To install dependencies:
sudo apt install libgtk-3-dev
sudo apt install libwebkit2gtk-4.0-dev
In case if pip fails with error:
webview/webview.c:1:20: fatal error: Python.h: No such file or directory
The python used in venv may be different from python in the system.
next might help, to install proper headers:
sudo apt install python3.6-dev
libwebkit2gtk-4.0-dev has no installation candidate
try sudo apt-get update if any error when execute the 3rd command
1)sudo apt install libgtk-3-dev
2)sudo apt-get update
3)sudo apt install libwebkit2gtk-4.0-dev