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

[本地部署]: 宝塔的虚拟环境,安装报错 #1154

Open
2 tasks done
ft4710403 opened this issue Aug 20, 2024 · 1 comment
Open
2 tasks done

[本地部署]: 宝塔的虚拟环境,安装报错 #1154

ft4710403 opened this issue Aug 20, 2024 · 1 comment
Labels
localhost deployment question Further information is requested

Comments

@ft4710403
Copy link

是否已存在现有反馈与解答?

  • 我确认没有已有issue或discussion,且已阅读常见问题

是否是一个代理配置相关的疑问?

  • 我确认这不是一个代理配置相关的疑问。

错误描述

Collecting primp>=0.6.0 (from duckduckgo-search>=5.3.0->-r requirements.txt (line 25))
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3f/39/e19361a629083228a0df97ac718965ab27626e2173a073f8a31736115ca9/primp-0.6.0.tar.gz (79 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/
  
  Checking for Rust toolchain....
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

复现操作

宝塔面板的python项目:
python版本:3.10.12
pip安装模块报错

错误日志

No response

运行环境

- OS: 
- Browser: 
- Gradio version: 
- Python version: 3.10.12

补充说明

No response

@ft4710403 ft4710403 added localhost deployment question Further information is requested labels Aug 20, 2024
@ft4710403
Copy link
Author

后来我把docker里面的python支持库:root.local\lib\python3.10\site-packages
直接拷贝到宝塔虚拟环境运行,还是报错:

是不是因为我的环境没联网呢,用的代理,代理配置如下:
#export no_proxy="localhost, 127.0.0.1, ::1"

export http_proxy='http://XXXX:8888'
export https_proxy='http://XXXX:8888'
export ALL_PROXY='socks5://XXXX:8888'
#source /etc/environment

[root@localhost ChuanhuChatGPT]# python3 ChuanhuChatbot.py
2024-08-20 12:15:01,780 [INFO] [config.py:330] 默认模型设置为了:GPT-4o-mini
2024-08-20 12:15:02,056 [INFO] [_client.py:1026] HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
fatal: unknown date format iso-strict
Running on local URL: http://127.0.0.1:8889
IMPORTANT: You are using gradio version 4.26.0, however version 4.29.0 is available, please upgrade.

2024-08-20 12:15:05,557 [INFO] [utils.py:643] 您的IP区域:中国。请立即检查代理设置,在不受支持的地区使用API可能导致账号被封禁。
Traceback (most recent call last):
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
yield
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 233, in handle_request
resp = self._pool.handle_request(req)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
raise exc from None
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
response = connection.handle_request(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/http_proxy.py", line 207, in handle_request
return self._connection.handle_request(proxy_request)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
return self._connection.handle_request(request)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/http11.py", line 143, in handle_request
raise exc
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/http11.py", line 113, in handle_request
) = self._receive_response_headers(**kwargs)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/http11.py", line 186, in _receive_response_headers
event = self._receive_event(timeout=timeout)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpcore/_sync/http11.py", line 238, in _receive_event
raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/data/ChuanhuChatGPT/ChuanhuChatbot.py", line 820, in
demo.queue().launch(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/gradio/blocks.py", line 2209, in launch
httpx.get(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_api.py", line 198, in get
return request(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_api.py", line 106, in request
return client.request(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_client.py", line 827, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_client.py", line 914, in send
response = self._send_handling_auth(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_client.py", line 1015, in _send_single_request
response = transport.handle_request(request)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 232, in handle_request
with map_httpcore_exceptions():
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/www/server/pyporject_evn/ChuanhuChatGPT_venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.
[root@localhost ChuanhuChatGPT]#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localhost deployment question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant