You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Python导入snscrape模块提示snscrape.base无_DeprecatedProperty属性如何解决

snscrape导入报错修复方案

报错原因

AttributeError: module 'snscrape.base' has no attribute '_DeprecatedProperty'属于pip官方源分发的snscrape稳定版本的已知缺陷,版本内部属性定义不匹配导致模块加载失败。

修复步骤

  • 首先卸载当前已安装的snscrape包,执行命令:
    pip3 uninstall snscrape -y
  • 安装经过验证无该bug的兼容稳定版本,执行命令:
    pip3 install snscrape==0.4.3.20220106

效果验证

重新运行导入代码即可正常执行:

import snscrape.modules.twitter as sntwitter

内容的提问来源于stack exchange,提问作者Rieder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.28 09:45:06