ToryPan / ChatGPT_WeChat

未认证微信公众号接入chatgpt,新增语音聊天(英语对话),基于Flask,实现个人微信公众号【无认证】接入ChatGPT
153 stars 42 forks source link

希望提供依赖文件requirements.txt #2

Closed tzf1003 closed 1 year ago

tzf1003 commented 1 year ago

有requirements.txt可以更快捷的部署程序

ToryPan commented 1 year ago

今天内更改,还会提供转语音接口~

------------------ 原始邮件 ------------------ 发件人: tzf1003 @.> 发送时间: 2023年4月5日 13:30 收件人: ToryPan/ChatGPT_WeChat @.> 抄送: Subscribed @.***> 主题: Re: [ToryPan/ChatGPT_WeChat] 希望提供依赖文件requirements.txt (Issue #2)

有requirements.txt可以更快捷的部署程序

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ToryPan commented 1 year ago

已更新~

tzf1003 commented 1 year ago

安装依赖azure-storage-0.37.0时出错

[root@VM-0-6-centos ChatGPT_WeChat]# ./1b364fe428a12261ea3dc461f55f7b40_venv/bin/pip install -r requirements.txt Looking in indexes: https://mirrors.tencent.com/pypi/simple Collecting azure_storage==0.37.0 Using cached https://mirrors.tencent.com/pypi/packages/5d/cd/cac628adf6cb0086a24c20d76609445f1bf841483d56ec9f5645bbaa9ab7/azure-storage-0.37.0.zip (4.3 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [20 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-cz2w9q_f/azure-storage_c3cb491740284019bc8a96634b6345fb/setup.py", line 55, in raise RuntimeError(message) RuntimeError:

  Starting with v0.37.0, the 'azure-storage' meta-package is deprecated and cannot be installed anymore.
  Please install the service specific packages prefixed by `azure` needed for your application.

  The complete list of available packages can be found at:
  https://aka.ms/azsdk/python/all

  Here's a non-exhaustive list of common packages:

  - [azure-storage-blob](https://pypi.org/project/azure-storage-blob) : Blob storage client
  - [azure-storage-file-share](https://pypi.org/project/azure-storage-file-share) : Storage file share client
  - [azure-storage-file-datalake](https://pypi.org/project/azure-storage-file-datalake) : ADLS Gen2 client
  - [azure-storage-queue](https://pypi.org/project/azure-storage-queue): Queue storage client

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

png

tzf1003 commented 1 year ago

安装依赖azure-storage-0.37.0时出错

[root@VM-0-6-centos ChatGPT_WeChat]# ./1b364fe428a12261ea3dc461f55f7b40_venv/bin/pip install -r 要求.txt 查找索引: https://mirrors.tencent.com/pypi/simple 收集 azure_storage==0.37.0 使用缓存 https://mirrors.tencent.com/pypi/packages/5d/cd/cac628adf6cb0086a24c20d76609445f1bf841483d56ec9f5645bbaa9ab7/azure-storage-0.37.0.zip (4.3 kB) 准备元数据 (setup.py) ...错误错误:子进程退出并显示错误

× python setup.py egg_info未成功运行。 │ 退出代码:1 ╰─> [20 行输出] 回溯(最近一次调用): 文件 “”,第 2 行,在文件 “” 中,第 34 行,在文件 “/tmp/pip-install-cz2w9q_f/azure-storage_c3cb491740284019bc8a96634b6345fb/setup.py”中,第 55 行,在 raise 中 运行时错误(消息) 运行时错误:

  Starting with v0.37.0, the 'azure-storage' meta-package is deprecated and cannot be installed anymore.
  Please install the service specific packages prefixed by `azure` needed for your application.

  The complete list of available packages can be found at:
  https://aka.ms/azsdk/python/all

  Here's a non-exhaustive list of common packages:

  - [azure-storage-blob](https://pypi.org/project/azure-storage-blob) : Blob storage client
  - [azure-storage-file-share](https://pypi.org/project/azure-storage-file-share) : Storage file share client
  - [azure-storage-file-datalake](https://pypi.org/project/azure-storage-file-datalake) : ADLS Gen2 client
  - [azure-storage-queue](https://pypi.org/project/azure-storage-queue): Queue storage client

  [end of output]

注意:此错误源自子进程,可能不是 pip 的问题。错误:元数据生成失败

× 生成包元数据时遇到错误。 ╰─> 输出见上文。

注意:这是上面提到的软件包的问题,而不是pip。提示:详见上文。

.png

关于这个错误,是否是因为azure-storage-0.37.0包已被弃用。

ToryPan commented 1 year ago

可能自动生成的requirement有问题,你安装这个试试pip install azure-cognitiveservices-speech,可以参考下教程:https://learn.microsoft.com/zh-cn/azure/cognitive-services/speech-service/quickstarts/setup-platform?tabs=linux%2Cubuntu%2Cdotnet%2Cjre%2Cmaven%2Cnodejs%2Cmac%2Cpypi&pivots=programming-language-python

ToryPan commented 1 year ago

改了一下requirement,麻烦更新试一下呢

tzf1003 commented 1 year ago

又有新的错误 OSError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /www/ChatGPT_WeChat/1b364fe428a12261ea3dc461f55f7b40_venv/lib/python3.9/site-packages/azure/cognitiveservices/speech/libMicrosoft.CognitiveServices.Speech.core.so) 应该是Linux系统库问题,我正在根据官方文档安装测试

ToryPan commented 1 year ago

我当时也遇到了,按照这个教程解决的:https://blog.csdn.net/qq_39779233/article/details/123961411

tzf1003 commented 1 year ago

好的,已经解决了,还有个小问题就是需要添加一个这个依赖,不然跑不起来。cryptography

gdphuang commented 1 year ago

为啥需要3个GPT token呢?

ToryPan commented 1 year ago

可以只填写一个,把另外两个删了就行。因为单个token有速率的限制,所以弄了多个账号。

ToryPan commented 1 year ago

填写openai的token时,要注意前面要加上:Bearer ,不然会报错。