请按照以下步骤重新安装 tweepy 并确认环境配置正确:
卸载 tweepy pip uninstall tweepy
删除 tweepy 相关缓存 请到 ~/.cache/pip 目录下删除 tweepy 缓存
清除 python 环境缓存 sudo rm -rf ~/.python-eggs sudo find / -name ".pyc" -exec rm -rf {} ;
安装 tweepy pip install tweepy
确认 tweepy 安装成功 python -c "import tweepy"
如果还是无法导入,请确认 tweepy 是否与当前环境匹配,比如 python 版本等。