gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

Error installing pip install g4f[webview]

Open BokDan93 opened this issue 3 months ago • 11 comments

Building wheel for webview (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for webview (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [10 lines of output] webview.c C:\Users\bokkd\AppData\Local\Temp\pip-install-8pmy7qug\webview_37391dfd1a4d4bbf8c17f898663d266d\webview\webview.h(1085): warning C4477: "sscanf": ў бва®ЄҐ д®а¬ вЁа®ў ­Ёп "%02x" вॡгҐвбп аЈг¬Ґ­в вЁЇ "unsigned int *", ­® ў аЁ вЁў­л© аЈг¬Ґ­в "1" Ё¬ҐҐв вЁЇ "char *" C:\Users\bokkd\AppData\Local\Temp\pip-install-8pmy7qug\webview_37391dfd1a4d4bbf8c17f898663d266d\webview\webview.h(1085): note: ४®¬Ґ­¤гҐвбп ЁбЇ®«м§®ў вм "%hhx" ў бва®ЄҐ д®а¬ вЁа®ў ­Ёп C:\Users\bokkd\AppData\Local\Temp\pip-install-8pmy7qug\webview_37391dfd1a4d4bbf8c17f898663d266d\webview\webview.h(1338): warning C4267: Ё­ЁжЁ «Ё§ жЁп: ЇаҐ®Ўа §®ў ­ЁҐ Ё§ "size_t" ў "int"; ў®§¬®¦­ Ї®вҐап ¤ ­­ле webview/webview.c(117): error C2065: PATH_MAX: ­Ґ®Ўкпў«Ґ­­л© Ё¤Ґ­вЁдЁЄ в®а webview/webview.c(117): error C2057: вॡгҐвбп Є®­бв ­в­®Ґ ўла ¦Ґ­ЁҐ webview/webview.c(117): error C2466: ­Ґў®§¬®¦­® ўл¤Ґ«Ёвм Ї ¬пвм ¤«п ¬ ббЁў Ї®бв®п­­®Ј® ­г«Ґў®Ј® а §¬Ґа webview/webview.c(117): error C2133: result: ­ҐЁ§ўҐбв­л© а §¬Ґа webview/webview.c(123): warning C4034: sizeof ў®§ўа й Ґв 0 error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\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 Failed to build webview ERROR: Could not build wheels for webview, which is required to install pyproject.toml-based projects

BokDan93 avatar Mar 28 '24 10:03 BokDan93

the same here:

(.venv) PS D:\Python_projects\my_g4f> pip install g4f[webview] Requirement already satisfied: g4f[webview] in d:\python_projects\my_g4f.venv\lib\site-packages (0.2.7.1) Requirement already satisfied: requests in d:\python_projects\my_g4f.venv\lib\site-packages (from g4f[webview]) (2.31.0) Requirement already satisfied: aiohttp in d:\python_projects\my_g4f.venv\lib\site-packages (from g4f[webview]) (3.9.3) Requirement already satisfied: brotli in d:\python_projects\my_g4f.venv\lib\site-packages (from g4f[webview]) (1.1.0) Requirement already satisfied: pycryptodome in d:\python_projects\my_g4f.venv\lib\site-packages (from g4f[webview]) (3.20.0) Collecting webview (from g4f[webview]) Using cached webview-0.1.5.tar.gz (18 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting platformdirs (from g4f[webview]) Using cached platformdirs-4.2.0-py3-none-any.whl.metadata (11 kB) Collecting plyer (from g4f[webview]) Using cached plyer-2.1.0-py2.py3-none-any.whl.metadata (61 kB) Requirement already satisfied: aiosignal>=1.1.2 in d:\python_projects\my_g4f.venv\lib\site-packages (from aiohttp->g4f[webview]) (1.3.1) Requirement already satisfied: attrs>=17.3.0 in d:\python_projects\my_g4f.venv\lib\site-packages (from aiohttp->g4f[webview]) (23.2.0) Requirement already satisfied: frozenlist>=1.1.1 in d:\python_projects\my_g4f.venv\lib\site-packages (from aiohttp->g4f[webview]) (1.4.1) Requirement already satisfied: multidict<7.0,>=4.5 in d:\python_projects\my_g4f.venv\lib\site-packages (from aiohttp->g4f[webview]) (6.0.5) Requirement already satisfied: yarl<2.0,>=1.0 in d:\python_projects\my_g4f.venv\lib\site-packages (from aiohttp->g4f[webview]) (1.9.4) Requirement already satisfied: charset-normalizer<4,>=2 in d:\python_projects\my_g4f.venv\lib\site-packages (from requests->g4f[webview]) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in d:\python_projects\my_g4f.venv\lib\site-packages (from requests->g4f[webview]) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in d:\python_projects\my_g4f.venv\lib\site-packages (from requests->g4f[webview]) (2.2.1) Requirement already satisfied: certifi>=2017.4.17 in d:\python_projects\my_g4f.venv\lib\site-packages (from requests->g4f[webview]) (2024.2.2) Using cached platformdirs-4.2.0-py3-none-any.whl (17 kB) Using cached plyer-2.1.0-py2.py3-none-any.whl (142 kB) Building wheels for collected packages: webview Building wheel for webview (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for webview (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [3 lines of output] webview.c C:\Users\dim\AppData\Local\Programs\Python\Python312\include\pyconfig.h(59): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: io.h: No such file or directory, error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\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 Failed to build webview ERROR: Could not build wheels for webview, which is required to install pyproject.toml-based projects

LingamYoni avatar Apr 01 '24 12:04 LingamYoni

I also have this problem

Anonymous6598 avatar Apr 01 '24 13:04 Anonymous6598

os:windows 11 python:3.10.10

How can I resolve the same error I encountered?

EvanZhou666 avatar Apr 02 '24 08:04 EvanZhou666

image

Same issue, I am using Python 3.10.11 and these are my Microsoft C++ Build Tools components which have been installed.

image

I do not know how to solve this issue or what more information I can provide to help us to solve it. >﹏<

zhulinyv avatar Apr 03 '24 11:04 zhulinyv

It is working for me on python 3.11. Alternatively you can use the Webserver.

hlohaus avatar Apr 05 '24 12:04 hlohaus

i encountered the same issue after installing build tools this error is also happening in other packages that require vs build tools

AksLolCoding avatar Apr 06 '24 21:04 AksLolCoding

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Apr 14 '24 00:04 github-actions[bot]

image

Same issue, I am using Python 3.10.11 and these are my Microsoft C++ Build Tools components which have been installed.

image

I do not know how to solve this issue or what more information I can provide to help us to solve it. >﹏<

这是一个可用的webview webview-python-master.zip

AutoWHEELx2 avatar Apr 20 '24 03:04 AutoWHEELx2

@AutoWHEELx2 Thanks a lot! I successfully installed the webview, and use python -m g4f.gui.webview command to start g4f successfully!

image

zhulinyv avatar Apr 20 '24 03:04 zhulinyv

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

github-actions[bot] avatar Apr 28 '24 00:04 github-actions[bot]

Same issue Clean install

evinruding avatar May 13 '24 12:05 evinruding