Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing pip install g4f[webview] #1765

Closed
BokDan93 opened this issue Mar 28, 2024 · 11 comments
Closed

Error installing pip install g4f[webview] #1765

BokDan93 opened this issue Mar 28, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@BokDan93
Copy link

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 BokDan93 added the bug Something isn't working label Mar 28, 2024
@LingamYoni
Copy link

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

@Anonymous6598
Copy link

I also have this problem

@EvanZhou666
Copy link

os:windows 11
python:3.10.10

How can I resolve the same error I encountered?

@zhulinyv
Copy link

zhulinyv commented Apr 3, 2024

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. >﹏<

@hlohaus
Copy link
Collaborator

hlohaus commented Apr 5, 2024

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

@AksLolCoding
Copy link
Contributor

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

Copy link

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 github-actions bot added the stale label Apr 14, 2024
@AutoWHEELx2
Copy link

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

@zhulinyv
Copy link

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

image

@github-actions github-actions bot removed the stale label Apr 21, 2024
Copy link

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 github-actions bot added the stale label Apr 28, 2024
@evinruding
Copy link

Same issue Clean install

@github-actions github-actions bot removed the stale label May 15, 2024
@hlohaus hlohaus closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants