CbPro python 库提供无效响应
CbPro python library giving invalid response
当我尝试使用 CBPro api 时,它给出了错误的响应
import cbpro
输出
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python310\lib\site-packages\cbpro\__init__.py", line 1, in <module>
from cbpro.authenticated_client import AuthenticatedClient
File "C:\Python310\lib\site-packages\cbpro\authenticated_client.py", line 10, in <module>
import requests
File "C:\Python310\lib\site-packages\requests\__init__.py", line 63, in <module>
from . import utils
File "C:\Python310\lib\site-packages\requests\utils.py", line 29, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "C:\Python310\lib\site-packages\requests\cookies.py", line 174, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
我在桌面上创建了一个单独的 python 实例,所有正确的 pip 导入和文件都有效。我刚刚从我的库文件夹中复制了导入文件,然后将 python 3.5.2 放入一个单独的文件夹中,并且工作得非常完美 https://www.python.org/downloads/release/python-352/
当我尝试使用 CBPro api 时,它给出了错误的响应
import cbpro
输出
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python310\lib\site-packages\cbpro\__init__.py", line 1, in <module>
from cbpro.authenticated_client import AuthenticatedClient
File "C:\Python310\lib\site-packages\cbpro\authenticated_client.py", line 10, in <module>
import requests
File "C:\Python310\lib\site-packages\requests\__init__.py", line 63, in <module>
from . import utils
File "C:\Python310\lib\site-packages\requests\utils.py", line 29, in <module>
from .cookies import RequestsCookieJar, cookiejar_from_dict
File "C:\Python310\lib\site-packages\requests\cookies.py", line 174, in <module>
class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
我在桌面上创建了一个单独的 python 实例,所有正确的 pip 导入和文件都有效。我刚刚从我的库文件夹中复制了导入文件,然后将 python 3.5.2 放入一个单独的文件夹中,并且工作得非常完美 https://www.python.org/downloads/release/python-352/