[Bug]: 配置报错
moshangchenkai opened this issue · comments
Installation Method | 安装方法与平台
Pip Install (I ignored requirements.txt)
Version | 版本
Latest | 最新版
OS | 操作系统
Windows
Describe the bug | 简述
PS D:\software\gpt_academic-master> python main.py
Traceback (most recent call last):
File "D:\software\gpt_academic-master\main.py", line 371, in
main()
File "D:\software\gpt_academic-master\main.py", line 28, in main
import gradio as gr
File "D:\Python 3.10\lib\site-packages\gradio_init_.py", line 3, in
import gradio.components as components
File "D:\Python 3.10\lib\site-packages\gradio\components.py", line 56, in
from gradio.blocks import Block, BlockContext
File "D:\Python 3.10\lib\site-packages\gradio\blocks.py", line 26, in
from gradio import (
File "D:\Python 3.10\lib\site-packages\gradio\networking.py", line 17, in
from gradio.routes import App
File "D:\Python 3.10\lib\site-packages\gradio\routes.py", line 48, in
from gradio.helpers import EventData
File "D:\Python 3.10\lib\site-packages\gradio\helpers.py", line 17, in
import matplotlib.pyplot as plt
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 2230, in
switch_backend(rcParams["backend"])
File "D:\Python 3.10\lib\site-packages\matplotlib_init_.py", line 672, in getitem
plt.switch_backend(rcsetup._auto_backend_sentinel)
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 247, in switch_backend
switch_backend(candidate)
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases.Backend):
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "D:\Python 3.10\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Python 3.10\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in
from .backend_qt import (
File "D:\Python 3.10\lib\site-packages\matplotlib\backend
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 247, in switch_backend
switch_backend(candidate)
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 267, in switch_backend
class backend_mod(matplotlib.backend_bases.Backend):
File "D:\Python 3.10\lib\site-packages\matplotlib\pyplot.py", line 268, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "D:\Python 3.10\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Python 3.10\lib\site-packages\matplotlib\backends\backend_qtagg.py", line 12, in
from .backend_qt import (
File "D:\Python 3.10\lib\site-packages\matplotlib\backends\backend_qt.py", line 73, in
_MODIFIER_KEYS = [
File "D:\Python 3.10\lib\site-packages\matplotlib\backends\backend_qt.py", line 74, in
(_to_int(getattr(_enum("QtCore.Qt.KeyboardModifier"), mod)),
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'KeyboardModifier'
PS D:\software\gpt_academic-master>
Screen Shot | 有帮助的截图
我复制代码了
Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)
No response
Hi,
请重新从requirements.txt中安装 gradio
pip install -r requirements.txt