当前位置:   article > 正文

python对接chatGPT的API踩坑历程_attributeerror: module 'openai' has no attribute '

attributeerror: module 'openai' has no attribute 'model

如果python版本3.7.1以上,可以直接【目前测试官网3.9版本比较稳定!】

本人实测,正常运行

python3 -m pip install --upgrade pip

No matching distribution found for pandas>=1.2.3 (from openai==0.10.5)

python3 -m pip install --upgrade pip

  1. AttributeError: module 'openai' has no attribute 'ChatCompletion'或者
  2. AttributeError: module 'openai' has no attribute 'Model'
  1. 从https://pypi.org/project/openai/#files下载,上传到服务器, openai-0.27.0-py3-none-any.whl
  2. 然后在该路径下pip3 install openai-0.27.0-py3-none-any.whl

ERROR: Package 'openai' requires a different Python: 3.6.8 not in '>=3.7.1'

显示python版本需要更高等级

Linux 下安装Python3.8_linux安装python3.8_dongfs-821的博客-CSDN博客

(Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

【改装python3.9】

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/611773
推荐阅读
相关标签
  

闽ICP备14008679号