[问题] 请问用Python3.10安装requests

楼主: adeniss ( )   2021-12-23 18:32:43
不好意思
之前用selenium写完code后
看到大家有推荐request
想说玩一下
也用pip安装完了
但是 在import时就发生问题
在import requests时就发生
Exception has occurred: ImportError
cannot import name 'Mapping' from 'collections'
(C:\Python\lib\collections\__init__.py)
collections里面也的确没有mapping
试着去pip install collections也没用
所以上来求救一下
不知道有没有版友可以帮忙解惑
谢谢
作者: cuteSquirrel (松鼠)   2021-12-23 19:19:00
出错的那行 把collections 改成 collections.abc
作者: lycantrope (阿宽)   2021-12-23 19:45:00
from typing import Mapping更新requests就可以解决了吧https://github.com/psf/requests/issues/5901

Links booklink

Contact Us: admin [ a t ] ucptt.com