使用modelscope模型出现TypeError
model_dir = snapshot_download('damo/cv_resnet34_face-attribute-recognition_fairface', cache_dir='path/to/local/dir')
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/snapshot_download.py", line 137, in snapshot_download
http_get_file(
File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/file_download.py", line 214, in http_get_file
retry = Retry(
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
解决方法
升级两个包
pip3 install --upgrade urllib3
pip3 install --upgrade requests
在尝试使用ModelScope下载damo/cv_resnet34_face-attribute-recognition_fairface模型时遇到了TypeError,原因是urllib3和requests库的版本不兼容。解决方案是通过pip3升级这两个库至最新版本。
6万+

被折叠的 条评论
为什么被折叠?



