Error pip install webview after downloading relevant workload from VS Build Tools Installer

Simone 0 Reputation points
2024-06-18T05:01:55.35+00:00

hi,

I want to install webview on pycharm. I already downloaded Visual Studio Installer and there installed the workload Desktop development with C++ with the optional (I hope that´s right) components: C++ CMake tools for Windows, MSVC v143 - VS2022 C++-x64/x86-Buildtools, Windows 11-SDK (10.0..22621.0), Testing tools core features - Build Tools and C++ Adress Sanitizer (Experimental) . I´m still getting this error:

Collecting webview
  Using cached webview-0.1.5.tar.gz (18 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: webview
  Building wheel for webview (setup.py): started
  Building wheel for webview (setup.py): finished with status 'error'
  Running setup.py clean for webview
Failed to build webview
  error: subprocess-exited-with-error
  
  python setup.py bdist_wheel did not run successfully.
  exit code: 1
  
  [10 lines of output]
  webview.c
C:\Users\simon\AppData\Local\Temp\pip-install-7gbkwquz\webview_e6fbdb5aad4e42e9ad83d243d94cb6ac\webview\webview.h(1085) warning C4477: 'sscanf' : format string '%02x' requires an argument of type 'unsigned int *', but variadic argument 1 has type 'char *'
       C:\Users\simon\AppData\Local\Temp\pip-install-7gbkwquz\webview_e6fbdb5aad4e42e9ad83d243d94cb6ac\webview\webview.h(1085) note: consider using '%hhx' in the format string
      C:\Users\simon\AppData\Local\Temp\pip-install-7gbkwquz\webview_e6fbdb5aad4e42e9ad83d243d94cb6ac\webview\webview.h(1338): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      webview/webview.c(117): error C2065: 'PATH_MAX': undeclared identifier
      webview/webview.c(117): error C2057: expected constant expression
      webview/webview.c(117): error C2466: cannot allocate an array of constant size 0
      webview/webview.c(117): error C2133: 'result': unknown size
      webview/webview.c(123): warning C4034: sizeof returns 0
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]
 note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for webview
ERROR: Could not build wheels for webview, which is required to install pyproject.toml-based projects

How can I fix this problem?

Best wishes,

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,851 questions
{count} votes