开发者社区 > 通义大模型 > 正文

python import dashscope报错AttributeError

python版本是3.11.5
Windows 10
pip install dashscope 包括尝试升级

import dashscope 引用就会报错
Traceback (most recent call last):
File "D:\auto\AI_qwen_ali.py", line 3, in
import dashscope
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope__init.py", line 4, in
from dashscope.aigc.code_generation import CodeGeneration
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope\aigc\
init.py", line 1, in
from .conversation import Conversation, History, HistoryItem
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope\aigc\conversation.py", line 8, in
from dashscope.client.base_api import BaseApi
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope\client\base_api.py", line 8, in
from dashscope.api_entities.api_request_factory import _build_api_request
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope\api_entities\api_request_factory.py", line 2, in
from dashscope.api_entities.api_request_data import ApiRequestData
File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\dashscope\api_entities\api_request_data.py", line 4, in
import aiohttp
File "C:\Program Files\Python311\Lib\site-packages\aiohttp\
init__.py", line 6, in
from .client import BaseConnector as BaseConnector
File "C:\Program Files\Python311\Lib\site-packages\aiohttp\client.py", line 32, in
from . import hdrs, http, payload
File "C:\Program Files\Python311\Lib\site-packages\aiohttp\http.py", line 7, in
from .http_parser import HeadersParser as HeadersParser
File "C:\Program Files\Python311\Lib\site-packages\aiohttp\http_parser.py", line 15, in
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "C:\Program Files\Python311\Lib\site-packages\aiohttp\helpers.py", line 100, in
old_debug = coroutines._DEBUG # type: ignore
^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio.coroutines' has no attribute '_DEBUG'

请按任意键继续. . .

展开
收起
m6slht4lwnowo 2024-05-28 14:47:03 156 0
0 条回答
写回答
取消 提交回答

通义千问大模型家族全面升级更大参数规模模型首次面世,全新通义千问2.0版本欢迎体验。https://tongyi.aliyun.com/

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载