当前位置:   article > 正文

pip 安装 openai 异常【已解决】_pip install openai 出错

pip install openai 出错

异常信息

ERROR: Command errored out with exit status 1: 
command: 'D:\software\anaconda3\python.exe' 'D:\software\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\WANGSH~1\AppData\Local\Temp\pip-build-env-_k8ekzrl\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 
cwd: None 
Complete output (14 lines): 
Traceback (most recent call last): 
File "D:\software\anaconda3\lib\runpy.py", line 193, in _run_module_as_main 
"__main__", mod_spec) 
File "D:\software\anaconda3\lib\runpy.py", line 85, in _run_code 
exec(code, run_globals) 
File "D:\software\anaconda3\lib\site-packages\pip\__main__.py", line 16, in <module> 
from pip._internal.cli. main import main as _main  # isort:skip # noqa 
File "D:\software\anaconda3\lib\site-packages\pip\_internal\cli\main.py", line 5, in <module> 
import locale 
File "D:\software\anaconda3\lib\locale.py", line 16, in <module> 
import re 
File "D:\software\anaconda3\lib\re.py", line 143, in <module> 
class RegexFlag(enum.IntFlag): 
AttributeError: module 'enum' has no attribute 'IntFlag' 
---------------------------------------- 
ERROR: Command errored out with exit status 1: 'D:\software\anaconda3\python.exe' 'D:\software\anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\WANGSH~1\AppData\Local\Temp\pip-build-env-_k8ekzrl\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools Check the logs for full command output.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

解决方案

1. 定位到 Python 安装目录下的 : \Lib\site-packages 目录

2. 删除 enum 打头的两个文件夹即可

在这里插入图片描述

成功

在这里插入图片描述

还是无法解决

文末联系

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

闽ICP备14008679号